about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev+love@gmail.com>2022-10-25 08:01:27 +0900
committerGitHub <noreply@github.com>2022-10-25 08:01:27 +0900
commite47d222a94d0d89128b16b09adbb96fccab2f7c8 (patch)
treef7fb2bafb3bc86e387b10241c88483f3d713a8e5 /src
parent11d11e3415a31b587b3cb8a3349e728cb30ada2a (diff)
parent3f1e99936a821976fec469dd503ad1bdcad423e7 (diff)
downloadrust-e47d222a94d0d89128b16b09adbb96fccab2f7c8.tar.gz
rust-e47d222a94d0d89128b16b09adbb96fccab2f7c8.zip
Rollup merge of #103350 - clubby789:refer-to-assoc-method, r=wesleywiser
Change terminology for assoc method suggestions when they are not called

Fixes #103325

```@rustbot``` label +A-diagnostics
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/resolve/issue-14254.stderr49
-rw-r--r--src/test/ui/resolve/resolve-assoc-suggestions.stderr2
-rw-r--r--src/test/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr2
3 files changed, 44 insertions, 9 deletions
diff --git a/src/test/ui/resolve/issue-14254.stderr b/src/test/ui/resolve/issue-14254.stderr
index c848014ad8f..690a40f7edd 100644
--- a/src/test/ui/resolve/issue-14254.stderr
+++ b/src/test/ui/resolve/issue-14254.stderr
@@ -26,7 +26,12 @@ error[E0425]: cannot find value `bah` in this scope
   --> $DIR/issue-14254.rs:36:9
    |
 LL |         bah;
-   |         ^^^ help: you might have meant to call the associated function: `Self::bah`
+   |         ^^^
+   |
+help: you might have meant to refer to the associated function
+   |
+LL |         Self::bah;
+   |         ~~~~~~~~~
 
 error[E0425]: cannot find value `b` in this scope
   --> $DIR/issue-14254.rs:38:9
@@ -56,7 +61,12 @@ error[E0425]: cannot find value `bah` in this scope
   --> $DIR/issue-14254.rs:53:9
    |
 LL |         bah;
-   |         ^^^ help: you might have meant to call the associated function: `Self::bah`
+   |         ^^^
+   |
+help: you might have meant to refer to the associated function
+   |
+LL |         Self::bah;
+   |         ~~~~~~~~~
 
 error[E0425]: cannot find value `b` in this scope
   --> $DIR/issue-14254.rs:55:9
@@ -68,31 +78,56 @@ error[E0425]: cannot find value `bah` in this scope
   --> $DIR/issue-14254.rs:64:9
    |
 LL |         bah;
-   |         ^^^ help: you might have meant to call the associated function: `Self::bah`
+   |         ^^^
+   |
+help: you might have meant to refer to the associated function
+   |
+LL |         Self::bah;
+   |         ~~~~~~~~~
 
 error[E0425]: cannot find value `bah` in this scope
   --> $DIR/issue-14254.rs:73:9
    |
 LL |         bah;
-   |         ^^^ help: you might have meant to call the associated function: `Self::bah`
+   |         ^^^
+   |
+help: you might have meant to refer to the associated function
+   |
+LL |         Self::bah;
+   |         ~~~~~~~~~
 
 error[E0425]: cannot find value `bah` in this scope
   --> $DIR/issue-14254.rs:82:9
    |
 LL |         bah;
-   |         ^^^ help: you might have meant to call the associated function: `Self::bah`
+   |         ^^^
+   |
+help: you might have meant to refer to the associated function
+   |
+LL |         Self::bah;
+   |         ~~~~~~~~~
 
 error[E0425]: cannot find value `bah` in this scope
   --> $DIR/issue-14254.rs:91:9
    |
 LL |         bah;
-   |         ^^^ help: you might have meant to call the associated function: `Self::bah`
+   |         ^^^
+   |
+help: you might have meant to refer to the associated function
+   |
+LL |         Self::bah;
+   |         ~~~~~~~~~
 
 error[E0425]: cannot find value `bah` in this scope
   --> $DIR/issue-14254.rs:100:9
    |
 LL |         bah;
-   |         ^^^ help: you might have meant to call the associated function: `Self::bah`
+   |         ^^^
+   |
+help: you might have meant to refer to the associated function
+   |
+LL |         Self::bah;
+   |         ~~~~~~~~~
 
 error[E0425]: cannot find function `baz` in this scope
   --> $DIR/issue-14254.rs:19:9
diff --git a/src/test/ui/resolve/resolve-assoc-suggestions.stderr b/src/test/ui/resolve/resolve-assoc-suggestions.stderr
index b6acaeb8cc2..8def9aa2025 100644
--- a/src/test/ui/resolve/resolve-assoc-suggestions.stderr
+++ b/src/test/ui/resolve/resolve-assoc-suggestions.stderr
@@ -50,7 +50,7 @@ error[E0425]: cannot find value `method` in this scope
   --> $DIR/resolve-assoc-suggestions.rs:34:9
    |
 LL |         method;
-   |         ^^^^^^ help: you might have meant to call the method: `self.method`
+   |         ^^^^^^ help: you might have meant to refer to the method: `self.method`
 
 error: aborting due to 9 previous errors
 
diff --git a/src/test/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr b/src/test/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr
index 2764e1f8132..f32e0404e46 100644
--- a/src/test/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr
+++ b/src/test/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr
@@ -40,7 +40,7 @@ LL |         bah;
 LL | fn ba() {}
    | ------- similarly named function `ba` defined here
    |
-help: you might have meant to call the associated function
+help: you might have meant to refer to the associated function
    |
 LL |         Self::bah;
    |         ~~~~~~~~~