summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/assoc_fn_without_self.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
commitc23a457e72abe608715ac76f076f47dc42af07a5 (patch)
tree2772049aaf84b5c9d0ed12ec8d86812f7a7904b6 /tests/ui/suggestions/assoc_fn_without_self.stderr
parentReleasing progress-linux version 1.73.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-c23a457e72abe608715ac76f076f47dc42af07a5.tar.xz
rustc-c23a457e72abe608715ac76f076f47dc42af07a5.zip
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/suggestions/assoc_fn_without_self.stderr')
-rw-r--r--tests/ui/suggestions/assoc_fn_without_self.stderr49
1 files changed, 43 insertions, 6 deletions
diff --git a/tests/ui/suggestions/assoc_fn_without_self.stderr b/tests/ui/suggestions/assoc_fn_without_self.stderr
index febdd6733..9cee7c7ee 100644
--- a/tests/ui/suggestions/assoc_fn_without_self.stderr
+++ b/tests/ui/suggestions/assoc_fn_without_self.stderr
@@ -4,7 +4,7 @@ error[E0425]: cannot find function `foo` in this scope
LL | foo();
| ^^^ not found in this scope
|
-help: consider using the associated function
+help: consider using the associated function on `Self`
|
LL | Self::foo();
| ++++++
@@ -12,31 +12,68 @@ LL | Self::foo();
error[E0425]: cannot find function `bar` in this scope
--> $DIR/assoc_fn_without_self.rs:17:9
|
+LL | fn bar(&self) {}
+ | --- a method by that name is available on `Self` here
+...
+LL | bar();
+ | ^^^ not found in this scope
+
+error[E0425]: cannot find function `baz` in this scope
+ --> $DIR/assoc_fn_without_self.rs:18:9
+ |
+LL | baz(2, 3);
+ | ^^^ not found in this scope
+ |
+help: consider using the associated function on `Self`
+ |
+LL | Self::baz(2, 3);
+ | ++++++
+
+error[E0425]: cannot find function `foo` in this scope
+ --> $DIR/assoc_fn_without_self.rs:14:13
+ |
+LL | foo();
+ | ^^^ not found in this scope
+
+error[E0425]: cannot find function `foo` in this scope
+ --> $DIR/assoc_fn_without_self.rs:24:9
+ |
+LL | foo();
+ | ^^^ not found in this scope
+ |
+help: consider using the associated function on `Self`
+ |
+LL | Self::foo();
+ | ++++++
+
+error[E0425]: cannot find function `bar` in this scope
+ --> $DIR/assoc_fn_without_self.rs:25:9
+ |
LL | bar();
| ^^^ not found in this scope
|
-help: consider using the associated function
+help: consider using the method on `Self`
|
LL | self.bar();
| +++++
error[E0425]: cannot find function `baz` in this scope
- --> $DIR/assoc_fn_without_self.rs:18:9
+ --> $DIR/assoc_fn_without_self.rs:26:9
|
LL | baz(2, 3);
| ^^^ not found in this scope
|
-help: consider using the associated function
+help: consider using the associated function on `Self`
|
LL | Self::baz(2, 3);
| ++++++
error[E0425]: cannot find function `foo` in this scope
- --> $DIR/assoc_fn_without_self.rs:14:13
+ --> $DIR/assoc_fn_without_self.rs:22:13
|
LL | foo();
| ^^^ not found in this scope
-error: aborting due to 4 previous errors
+error: aborting due to 8 previous errors
For more information about this error, try `rustc --explain E0425`.