File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
branches/tmp/src/librustc/middle Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
32
32
refs/heads/beta: 9854143cba679834bc4ef932858cd5303f015a0e
33
33
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
34
34
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
35
- refs/heads/tmp: 2f7658a52829b8208330401735c1b88638ed44c0
35
+ refs/heads/tmp: 7875dae83fac23fdf59765eb548c2237850d6b15
36
36
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
37
37
refs/tags/homu-tmp: 53a183f0274316596bf9405944d4f0468d8c93e4
38
38
refs/heads/gate: 97c84447b65164731087ea82685580cc81424412
Original file line number Diff line number Diff line change @@ -6047,19 +6047,20 @@ pub fn eval_repeat_count(tcx: &ctxt, count_expr: &ast::Expr) -> usize {
6047
6047
"expected positive integer for repeat count, found {}" ,
6048
6048
found) ;
6049
6049
}
6050
- Err ( _) => {
6050
+ Err ( err) => {
6051
+ let err_description = err. description ( ) ;
6051
6052
let found = match count_expr. node {
6052
6053
ast:: ExprPath ( None , ast:: Path {
6053
6054
global : false ,
6054
6055
ref segments,
6055
6056
..
6056
6057
} ) if segments. len ( ) == 1 =>
6057
- " variable",
6058
+ format ! ( "{}" , "found variable") ,
6058
6059
_ =>
6059
- "non-constant expression"
6060
+ format ! ( "but {}" , err_description ) ,
6060
6061
} ;
6061
6062
span_err ! ( tcx. sess, count_expr. span, E0307 ,
6062
- "expected constant integer for repeat count, found {}" ,
6063
+ "expected constant integer for repeat count, {}" ,
6063
6064
found) ;
6064
6065
}
6065
6066
}
You can’t perform that action at this time.
0 commit comments