Closed
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.