From b6ec75fe62e2749841a91c0c4392653d49f10d6a Mon Sep 17 00:00:00 2001 From: kennytm Date: Thu, 15 Mar 2018 17:59:17 +0800 Subject: [PATCH] Remove unnecessary "`" in error message E0307 (invalid self type). --- src/librustc_typeck/check/wfcheck.rs | 2 +- src/test/ui/span/issue-27522.stderr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustc_typeck/check/wfcheck.rs b/src/librustc_typeck/check/wfcheck.rs index d10ee358e07..b94af0a1e00 100644 --- a/src/librustc_typeck/check/wfcheck.rs +++ b/src/librustc_typeck/check/wfcheck.rs @@ -525,7 +525,7 @@ impl<'a, 'gcx> CheckTypeWellFormedVisitor<'a, 'gcx> { } else { fcx.tcx.sess.diagnostic().mut_span_err( span, &format!("invalid `self` type: {:?}", self_arg_ty)) - .note(&format!("type must be `{:?}` or a type that dereferences to it`", self_ty)) + .note(&format!("type must be `{:?}` or a type that dereferences to it", self_ty)) .help("consider changing to `self`, `&self`, `&mut self`, or `self: Box`") .code(DiagnosticId::Error("E0307".into())) .emit(); diff --git a/src/test/ui/span/issue-27522.stderr b/src/test/ui/span/issue-27522.stderr index d0611bd580f..9b61ecae651 100644 --- a/src/test/ui/span/issue-27522.stderr +++ b/src/test/ui/span/issue-27522.stderr @@ -4,7 +4,7 @@ error[E0307]: invalid `self` type: &SomeType LL | fn handler(self: &SomeType); //~ ERROR invalid `self` type | ^^^^^^^^^ | - = note: type must be `Self` or a type that dereferences to it` + = note: type must be `Self` or a type that dereferences to it = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` error: aborting due to previous error