Update compiler error E0055 to use new error format

This commit is contained in:
Nick Massey 2016-08-04 15:35:43 -06:00
parent e804a3cf25
commit b5b3539186
2 changed files with 7 additions and 3 deletions

View File

@ -54,9 +54,11 @@ impl<'a, 'gcx, 'tcx> Iterator for Autoderef<'a, 'gcx, 'tcx> {
if self.steps.len() == tcx.sess.recursion_limit.get() {
// We've reached the recursion limit, error gracefully.
span_err!(tcx.sess, self.span, E0055,
struct_span_err!(tcx.sess, self.span, E0055,
"reached the recursion limit while auto-dereferencing {:?}",
self.cur_ty);
self.cur_ty)
.span_label(self.span, &format!("deref recursion limit reached"))
.emit();
return None;
}

View File

@ -18,5 +18,7 @@ impl Foo {
fn main() {
let foo = Foo;
let ref_foo = &&Foo;
ref_foo.foo(); //~ ERROR E0055
ref_foo.foo();
//~^ ERROR E0055
//~| NOTE deref recursion limit reached
}