about summary refs log tree commit diff
path: root/tests/ui/ufcs
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2023-01-08 06:54:52 +0000
committerEsteban Küber <esteban@kuber.com.ar>2023-01-11 21:30:10 +0000
commit12ddf778113b291027ff64406ce9d585281debf5 (patch)
treeb96e07bafbe19d8a4772f0d0cbbd2be8e2054fdb /tests/ui/ufcs
parentb22c152958eade17a71d899b29a2d39bcc77aa48 (diff)
downloadrust-12ddf778113b291027ff64406ce9d585281debf5.tar.gz
rust-12ddf778113b291027ff64406ce9d585281debf5.zip
When suggesting writing a fully qualified path probe for appropriate types
Fix #46585.
Diffstat (limited to 'tests/ui/ufcs')
-rw-r--r--tests/ui/ufcs/ufcs-partially-resolved.stderr7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/ui/ufcs/ufcs-partially-resolved.stderr b/tests/ui/ufcs/ufcs-partially-resolved.stderr
index 5f7f6aa9f6e..72fccea8ae3 100644
--- a/tests/ui/ufcs/ufcs-partially-resolved.stderr
+++ b/tests/ui/ufcs/ufcs-partially-resolved.stderr
@@ -205,7 +205,12 @@ error[E0223]: ambiguous associated type
   --> $DIR/ufcs-partially-resolved.rs:36:12
    |
 LL |     let _: <u8 as Tr>::Y::NN;
-   |            ^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<<u8 as Tr>::Y as Trait>::NN`
+   |            ^^^^^^^^^^^^^^^^^
+   |
+help: if there were a trait named `Example` with associated type `NN` implemented for `<u8 as Tr>::Y`, you could use the fully-qualified path
+   |
+LL |     let _: <<u8 as Tr>::Y as Example>::NN;
+   |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0599]: no associated item named `NN` found for type `u16` in the current scope
   --> $DIR/ufcs-partially-resolved.rs:38:20