Skip to content

Commit 6e60b9a

Browse files
committed
---
yaml --- r: 195991 b: refs/heads/beta c: 7875dae h: refs/heads/master i: 195989: eda630e 195987: ceed5b2 195983: 8088fc4 v: v3
1 parent baa4639 commit 6e60b9a

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2929
refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3030
refs/heads/batch: b7fd822592a4fb577552d93010c4a4e14f314346
3131
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
32-
refs/heads/beta: 2f7658a52829b8208330401735c1b88638ed44c0
32+
refs/heads/beta: 7875dae83fac23fdf59765eb548c2237850d6b15
3333
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3434
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
3535
refs/heads/tmp: 9de34a84bb300bab1bf0227f577331620cd60511

branches/beta/src/librustc/middle/ty.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6047,19 +6047,20 @@ pub fn eval_repeat_count(tcx: &ctxt, count_expr: &ast::Expr) -> usize {
60476047
"expected positive integer for repeat count, found {}",
60486048
found);
60496049
}
6050-
Err(_) => {
6050+
Err(err) => {
6051+
let err_description = err.description();
60516052
let found = match count_expr.node {
60526053
ast::ExprPath(None, ast::Path {
60536054
global: false,
60546055
ref segments,
60556056
..
60566057
}) if segments.len() == 1 =>
6057-
"variable",
6058+
format!("{}", "found variable"),
60586059
_ =>
6059-
"non-constant expression"
6060+
format!("but {}", err_description),
60606061
};
60616062
span_err!(tcx.sess, count_expr.span, E0307,
6062-
"expected constant integer for repeat count, found {}",
6063+
"expected constant integer for repeat count, {}",
60636064
found);
60646065
}
60656066
}

0 commit comments

Comments
 (0)