about summary refs log tree commit diff
path: root/tests/ui/parser
diff options
context:
space:
mode:
authorEsteban Kรผber <esteban@kuber.com.ar>2023-10-21 01:18:41 +0000
committerEsteban Kรผber <esteban@kuber.com.ar>2023-11-07 00:54:10 +0000
commitf926031ea50ef58c1c8bfccd98da73d86d5fc937 (patch)
treeecd76d25ae1eaa3df2418337f7d42f19a77cfe35 /tests/ui/parser
parentb049093560aa1c69face8c1893bd8acd99fff275 (diff)
downloadrust-f926031ea50ef58c1c8bfccd98da73d86d5fc937.tar.gz
rust-f926031ea50ef58c1c8bfccd98da73d86d5fc937.zip
When not finding assoc fn on type, look for builder fn
When we have a resolution error when looking at a fully qualified path
on a type, look for all associated functions on inherent impls that
return `Self` and mention them to the user.

Fix #69512.
Diffstat (limited to 'tests/ui/parser')
-rw-r--r--tests/ui/parser/emoji-identifiers.stderr6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/parser/emoji-identifiers.stderr b/tests/ui/parser/emoji-identifiers.stderr
index e645b68ba87..8250dd1ea2e 100644
--- a/tests/ui/parser/emoji-identifiers.stderr
+++ b/tests/ui/parser/emoji-identifiers.stderr
@@ -75,6 +75,12 @@ LL |     ๐Ÿ‘€::full_ofโœจ()
    |         |
    |         function or associated item not found in `๐Ÿ‘€`
    |         help: there is an associated function with a similar name: `full_of_โœจ`
+   |
+note: if you're trying to build a new `๐Ÿ‘€`, consider using `๐Ÿ‘€::full_of_โœจ` which returns `๐Ÿ‘€`
+  --> $DIR/emoji-identifiers.rs:4:5
+   |
+LL |     fn full_of_โœจ() -> ๐Ÿ‘€ {
+   |     ^^^^^^^^^^^^^^^^^^^^^
 
 error[E0425]: cannot find function `i_like_to_๐Ÿ˜„_a_lot` in this scope
   --> $DIR/emoji-identifiers.rs:13:13