1 // Users cannot yet construct structs through associated types
2 // in both expressions and patterns
3 
4 #![feature(more_qualified_paths)]
5 
main()6 fn main() {
7     let <Foo as A>::Assoc(n) = <Foo as A>::Assoc(2);
8     //~^ ERROR expected method or associated constant, found associated type
9     //~| ERROR expected method or associated constant, found associated type
10     assert!(n == 2);
11 }
12 
13 struct TupleStruct(i8);
14 
15 struct Foo;
16 
17 
18 trait A {
19     type Assoc;
20 }
21 
22 impl A for Foo {
23     type Assoc = TupleStruct;
24 }
25