]> git.lizzy.rs Git - rust.git/blob - tests/ui/structs/struct-path-associated-type.stderr
Rollup merge of #106829 - compiler-errors:more-alias-combine, r=spastorino
[rust.git] / tests / ui / structs / struct-path-associated-type.stderr
1 error[E0071]: expected struct, variant or union type, found associated type
2   --> $DIR/struct-path-associated-type.rs:12:13
3    |
4 LL |     let s = T::A {};
5    |             ^^^^ not a struct
6
7 error[E0107]: this associated type takes 0 generic arguments but 1 generic argument was supplied
8   --> $DIR/struct-path-associated-type.rs:14:16
9    |
10 LL |     let z = T::A::<u8> {};
11    |                ^------ help: remove these generics
12    |                |
13    |                expected 0 generic arguments
14    |
15 note: associated type defined here, with 0 generic parameters
16   --> $DIR/struct-path-associated-type.rs:4:10
17    |
18 LL |     type A;
19    |          ^
20
21 error[E0071]: expected struct, variant or union type, found associated type
22   --> $DIR/struct-path-associated-type.rs:14:13
23    |
24 LL |     let z = T::A::<u8> {};
25    |             ^^^^ not a struct
26
27 error[E0071]: expected struct, variant or union type, found associated type
28   --> $DIR/struct-path-associated-type.rs:18:9
29    |
30 LL |         T::A {} => {}
31    |         ^^^^ not a struct
32
33 error[E0107]: this associated type takes 0 generic arguments but 1 generic argument was supplied
34   --> $DIR/struct-path-associated-type.rs:25:16
35    |
36 LL |     let z = T::A::<u8> {};
37    |                ^------ help: remove these generics
38    |                |
39    |                expected 0 generic arguments
40    |
41 note: associated type defined here, with 0 generic parameters
42   --> $DIR/struct-path-associated-type.rs:4:10
43    |
44 LL |     type A;
45    |          ^
46
47 error[E0223]: ambiguous associated type
48   --> $DIR/struct-path-associated-type.rs:32:13
49    |
50 LL |     let s = S::A {};
51    |             ^^^^ help: use the fully-qualified path: `<S as Tr>::A`
52
53 error[E0223]: ambiguous associated type
54   --> $DIR/struct-path-associated-type.rs:33:13
55    |
56 LL |     let z = S::A::<u8> {};
57    |             ^^^^ help: use the fully-qualified path: `<S as Tr>::A`
58
59 error[E0223]: ambiguous associated type
60   --> $DIR/struct-path-associated-type.rs:35:9
61    |
62 LL |         S::A {} => {}
63    |         ^^^^ help: use the fully-qualified path: `<S as Tr>::A`
64
65 error: aborting due to 8 previous errors
66
67 Some errors have detailed explanations: E0071, E0107, E0223.
68 For more information about an error, try `rustc --explain E0071`.