Skip to content

Commit 55a0075

Browse files
committed
Rollup merge of #49042 - kennytm:fix-e0307-typo, r=rkruppe
Remove unnecessary "`" in error message E0307 (invalid self type).
2 parents 77cf02d + b6ec75f commit 55a0075

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/librustc_typeck/check/wfcheck.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ impl<'a, 'gcx> CheckTypeWellFormedVisitor<'a, 'gcx> {
525525
} else {
526526
fcx.tcx.sess.diagnostic().mut_span_err(
527527
span, &format!("invalid `self` type: {:?}", self_arg_ty))
528-
.note(&format!("type must be `{:?}` or a type that dereferences to it`", self_ty))
528+
.note(&format!("type must be `{:?}` or a type that dereferences to it", self_ty))
529529
.help("consider changing to `self`, `&self`, `&mut self`, or `self: Box<Self>`")
530530
.code(DiagnosticId::Error("E0307".into()))
531531
.emit();

src/test/ui/span/issue-27522.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0307]: invalid `self` type: &SomeType
44
LL | fn handler(self: &SomeType); //~ ERROR invalid `self` type
55
| ^^^^^^^^^
66
|
7-
= note: type must be `Self` or a type that dereferences to it`
7+
= note: type must be `Self` or a type that dereferences to it
88
= help: consider changing to `self`, `&self`, `&mut self`, or `self: Box<Self>`
99

1010
error: aborting due to previous error

0 commit comments

Comments
 (0)