X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustc_typeck%2Fcheck%2Fautoderef.rs;h=2cd2bb5064877a2c9502e351bad54216a0b2ac36;hb=f03987276656134f25f92f7434d7d1c63c9e981c;hp=743a2390ec43d5a9fcac17d62f0e0f4f689c0646;hpb=ff4500c389a31d2a93bfdf7e8dea1346e9ad105b;p=rust.git diff --git a/src/librustc_typeck/check/autoderef.rs b/src/librustc_typeck/check/autoderef.rs index 743a2390ec4..2cd2bb50648 100644 --- a/src/librustc_typeck/check/autoderef.rs +++ b/src/librustc_typeck/check/autoderef.rs @@ -59,15 +59,15 @@ fn next(&mut self) -> Option { if self.steps.len() >= *tcx.sess.recursion_limit.get() { // We've reached the recursion limit, error gracefully. let suggested_limit = *tcx.sess.recursion_limit.get() * 2; - let msg = format!("reached the recursion limit while auto-dereferencing {:?}", + let msg = format!("reached the recursion limit while auto-dereferencing `{:?}`", self.cur_ty); - let error_id = (DiagnosticMessageId::ErrorId(55), Some(self.span), msg.clone()); + let error_id = (DiagnosticMessageId::ErrorId(55), Some(self.span), msg); let fresh = tcx.sess.one_time_diagnostics.borrow_mut().insert(error_id); if fresh { struct_span_err!(tcx.sess, self.span, E0055, - "reached the recursion limit while auto-dereferencing {:?}", + "reached the recursion limit while auto-dereferencing `{:?}`", self.cur_ty) .span_label(self.span, "deref recursion limit reached") .help(&format!(