summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/suggest-add-self.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/suggestions/suggest-add-self.stderr')
-rw-r--r--tests/ui/suggestions/suggest-add-self.stderr29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/ui/suggestions/suggest-add-self.stderr b/tests/ui/suggestions/suggest-add-self.stderr
new file mode 100644
index 000000000..a5e8f93de
--- /dev/null
+++ b/tests/ui/suggestions/suggest-add-self.stderr
@@ -0,0 +1,29 @@
+error[E0424]: expected value, found module `self`
+ --> $DIR/suggest-add-self.rs:5:9
+ |
+LL | pub(crate) fn f() {
+ | - this function doesn't have a `self` parameter
+LL | self.0
+ | ^^^^ `self` value is a keyword only available in methods with a `self` parameter
+ |
+help: add a `self` receiver parameter to make the associated `fn` a method
+ |
+LL | pub(crate) fn f(&self) {
+ | +++++
+
+error[E0424]: expected value, found module `self`
+ --> $DIR/suggest-add-self.rs:10:9
+ |
+LL | pub fn g() {
+ | - this function doesn't have a `self` parameter
+LL | self.0
+ | ^^^^ `self` value is a keyword only available in methods with a `self` parameter
+ |
+help: add a `self` receiver parameter to make the associated `fn` a method
+ |
+LL | pub fn g(&self) {
+ | +++++
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0424`.