]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_typeck/check/autoderef.rs
Enclose type in backticks for "reached the recursion limit while auto-dereferencing...
[rust.git] / src / librustc_typeck / check / autoderef.rs
index 73489309d074247bcb5ca595f5a474997e332269..2cd2bb5064877a2c9502e351bad54216a0b2ac36 100644 (file)
@@ -59,7 +59,7 @@ fn next(&mut self) -> Option<Self::Item> {
         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);
             let fresh = tcx.sess.one_time_diagnostics.borrow_mut().insert(error_id);
@@ -67,7 +67,7 @@ fn next(&mut self) -> Option<Self::Item> {
                 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!(