-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsD-confusingDiagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint that should be reworked.
Description
I tried this (play):
pub enum Uwu {
Hi
}
impl Uwu {
fn a() -> Uwu {
use Self::Hi;
Hi
}
}
Heres the current output:
Compiling playground v0.0.1 (/playground)
error[E0432]: unresolved import `Self`
--> src/lib.rs:8:13
|
8 | use Self::Hi;
| ^^^^ `Self` is only available in impls, traits, and type definitions
For more information about this error, try `rustc --explain E0432`.
error: could not compile `playground` due to previous error
The label that says "Self
is only available in impls" is misleading since it is already in an impl.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsD-confusingDiagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint that should be reworked.