Skip to content

Commit

Permalink
Rollup merge of #35333 - nickmass:e0055-formatting, r=jonathandturner
Browse files Browse the repository at this point in the history
Update compiler error E0055 to use new error format

Addresses #35213, Part of the #35233 meta bug

r? @jonathandturner
  • Loading branch information
GuillaumeGomez authored Aug 5, 2016
2 parents aebe1d5 + b5b3539 commit 854532a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/librustc_typeck/check/autoderef.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
4 changes: 3 additions & 1 deletion src/test/compile-fail/E0055.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 854532a

Please sign in to comment.