Closed
Description
enum Enum {
Variant,
}
impl Enum {
fn choose() -> Self {
Self::Variant //~ ERROR no variant named `Variant` found for type `Enum` in the current scope
}
}
I'm not sure if this is supposed to be allowed or not, but the error message is incorrect. Is there an up-to-date document describing all the places Self
is allowed instead of a type name?
Metadata
Metadata
Assignees
Labels
No labels