-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.P-mediumMedium priorityMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language team
Description
type items don't work with enums.
#[derive(Debug)]
enum Foo {
Bar,
Baz,
}
type Loz = Foo;
fn main() {
let y = Loz::Bar;
println!("{:?}", y);
}
On the stable channel the following error occurs:
<anon>:8:13: 8:21 error: type `Foo` does not implement any method in scope named `Bar`
<anon>:8 let y = Loz::Bar;
^~~~~~~~
error: aborting due to previous error
playpen: application terminated with error code 101```
lambda-fairy, dashed, vccortez, noryb009, stanislav-tkach and 19 more
Metadata
Metadata
Assignees
Labels
A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.P-mediumMedium priorityMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language team