diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2020-08-14 10:16:34 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2020-08-14 10:16:34 -0700 |
| commit | 4ecdec1fb665363ee46af24a9a6edf73a9b602ec (patch) | |
| tree | fb05e61d08bd98cd52c0d1f3db5e6dd58081cfdf | |
| parent | 360388b160ca5be560fec59acb84a86e813524f3 (diff) | |
| download | rust-4ecdec1fb665363ee46af24a9a6edf73a9b602ec.tar.gz rust-4ecdec1fb665363ee46af24a9a6edf73a9b602ec.zip | |
review comment: suggestion message wording
| -rw-r--r-- | src/librustc_resolve/late/diagnostics.rs | 3 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-5099.stderr | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/librustc_resolve/late/diagnostics.rs b/src/librustc_resolve/late/diagnostics.rs index 67a9d9b4ec1..3df6a230b0f 100644 --- a/src/librustc_resolve/late/diagnostics.rs +++ b/src/librustc_resolve/late/diagnostics.rs @@ -202,7 +202,8 @@ impl<'a> LateResolutionVisitor<'a, '_, '_> { }; err.span_suggestion_verbose( span, - "you are also missing a `self` receiver argument", + "if you meant to use `self`, you are also missing a `self` receiver \ + argument", sugg.to_string(), Applicability::MaybeIncorrect, ); diff --git a/src/test/ui/issues/issue-5099.stderr b/src/test/ui/issues/issue-5099.stderr index 56b02c45a08..b52fd28b2b5 100644 --- a/src/test/ui/issues/issue-5099.stderr +++ b/src/test/ui/issues/issue-5099.stderr @@ -8,7 +8,7 @@ help: you might have meant to use `self` here instead | LL | self.a | ^^^^ -help: you are also missing a `self` receiver argument +help: if you meant to use `self`, you are also missing a `self` receiver argument | LL | fn a(&self) -> A { | ^^^^^ @@ -23,7 +23,7 @@ help: you might have meant to use `self` here instead | LL | self.b(x); | ^^^^ -help: you are also missing a `self` receiver argument +help: if you meant to use `self`, you are also missing a `self` receiver argument | LL | fn b(&self, x: i32) { | ^^^^^^ |
