-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to apply type
on enum
#28556
Comments
I changed your code to this so it would compile at all: mod test_mod {
enum A {
Foo,
}
}
type Alias = test_mod::A;
fn main () {
let _v = Alias::Foo; // Compile error
} (You needed a main function) It seems like the alias is doing fine, but it can't find Foo. Odd. |
I'd like to work on this, but I'm not sure where in the codebase to look. Can someone tell me? |
@ChristopherDumas Hmm, I just omitted the main function. The error is just what you said, it can't find Foo. |
The type alias itself is correctly rejected if you remove the |
Possible duplicate of #26264 |
Ah yes, looks to be a dupe of #26264 indeed! |
…, r=nikomatsakis reference.md: clarify the limitation of type alias on an enum Tentatively define the current behavior as the specification. Cf. rust-lang#26264, rust-lang#28556, rust-lang#30936
The text was updated successfully, but these errors were encountered: