Better diagnostic for use Self::..

This commit is contained in:
clubby789 2023-05-16 19:08:57 +00:00
parent b652d9a0fd
commit eaf47a30cb
2 changed files with 12 additions and 2 deletions

View file

@ -8,7 +8,7 @@ error[E0432]: unresolved import `Self`
--> $DIR/use-self-type.rs:6:13
|
LL | use Self::f;
| ^^^^ `Self` is only available in impls, traits, and type definitions
| ^^^^ `Self` cannot be used in imports
error: aborting due to 2 previous errors