Updated E0306 to new format.
This commit is contained in:
parent
41fe4b7195
commit
b7468fa189
5 changed files with 54 additions and 19 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue