]> git.lizzy.rs Git - rust.git/blob - src/test/ui/feature-gates/feature-gate-more-qualified-paths.rs
Rollup merge of #94449 - GuillaumeGomez:explanation-e0726, r=Urgau
[rust.git] / src / test / ui / feature-gates / feature-gate-more-qualified-paths.rs
1 fn main() {
2     // destructure through a qualified path
3     let <Foo as A>::Assoc { br } = StructStruct { br: 2 };
4     //~^ ERROR usage of qualified paths in this context is experimental
5     let _ = <Foo as A>::Assoc { br: 2 };
6     //~^ ERROR usage of qualified paths in this context is experimental
7     let <E>::V(..) = E::V(0);
8     //~^ ERROR usage of qualified paths in this context is experimental
9 }
10
11 struct StructStruct {
12     br: i8,
13 }
14
15 struct Foo;
16
17 trait A {
18     type Assoc;
19 }
20
21 impl A for Foo {
22     type Assoc = StructStruct;
23 }
24
25 enum E {
26     V(u8)
27 }