diff options
| author | Federico Ravasio <ravasio.federico@gmail.com> | 2016-08-05 16:54:05 +0200 |
|---|---|---|
| committer | Federico Ravasio <ravasio.federico@gmail.com> | 2016-08-05 16:55:14 +0200 |
| commit | b7468fa1896e4fc4bec0bea4fecc241ab8295129 (patch) | |
| tree | 3f75cd653dfbe57fc33803b169bcc6cd88672183 /src/librustc_const_eval | |
| parent | 41fe4b719538d2505a75cf9c065ec12411b94ac5 (diff) | |
Updated E0306 to new format.
Diffstat (limited to 'src/librustc_const_eval')
| -rw-r--r-- | src/librustc_const_eval/eval.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/librustc_const_eval/eval.rs b/src/librustc_const_eval/eval.rs index d424b57c938..43d9725baaf 100644 --- a/src/librustc_const_eval/eval.rs +++ b/src/librustc_const_eval/eval.rs @@ -1337,10 +1337,13 @@ pub fn eval_length<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, Ok(val as usize) }, Ok(const_val) => { - span_err!(tcx.sess, count_expr.span, E0306, - "expected usize for {}, found {}", - reason, - const_val.description()); + struct_span_err!(tcx.sess, count_expr.span, E0306, + "expected `usize` for {}, found {}", + reason, + const_val.description()) + .span_label(count_expr.span, &format!("expected `usize`")) + .emit(); + Err(ErrorReported) } Err(err) => { |
