]> git.lizzy.rs Git - rust.git/blob - tests/ui/type-alias-enum-variants/resolve-to-enum-variant-in-type-namespace-and-error.rs
Rollup merge of #107576 - P1n3appl3:master, r=tmandry
[rust.git] / tests / ui / type-alias-enum-variants / resolve-to-enum-variant-in-type-namespace-and-error.rs
1 // Check that the compiler will resolve `<E>::V` to the variant `V` in the type namespace
2 // but will reject this because `enum` variants do not exist in the type namespace.
3
4 enum E {
5     V
6 }
7
8 fn check() -> <E>::V {}
9 //~^ ERROR expected type, found variant `V`
10
11 fn main() {}