diff options
| author | kennytm <kennytm@gmail.com> | 2018-03-16 01:49:51 +0800 |
|---|---|---|
| committer | kennytm <kennytm@gmail.com> | 2018-03-16 05:35:20 +0800 |
| commit | 55a0075a20ec064e7ec793656d564e13e9206836 (patch) | |
| tree | 70d453ef717718af04494a3162359edddc6e63bc | |
| parent | 77cf02de189183c86d3e5f8e31a16d02201b5f8d (diff) | |
| parent | b6ec75fe62e2749841a91c0c4392653d49f10d6a (diff) | |
| download | rust-55a0075a20ec064e7ec793656d564e13e9206836.tar.gz rust-55a0075a20ec064e7ec793656d564e13e9206836.zip | |
Rollup merge of #49042 - kennytm:fix-e0307-typo, r=rkruppe
Remove unnecessary "`" in error message E0307 (invalid self type).
| -rw-r--r-- | src/librustc_typeck/check/wfcheck.rs | 2 | ||||
| -rw-r--r-- | 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<Self>`") .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<Self>` error: aborting due to previous error |
