]> git.lizzy.rs Git - rust.git/blob - src/test/ui/qualified/qualified-path-params.rs
:arrow_up: rust-analyzer
[rust.git] / src / test / ui / qualified / qualified-path-params.rs
1 // Check that qualified paths with type parameters
2 // fail during type checking and not during parsing
3
4 struct S;
5
6 trait Tr {
7     type A;
8 }
9
10 impl Tr for S {
11     type A = S;
12 }
13
14 impl S {
15     fn f<T>() {}
16 }
17
18 fn main() {
19     match 10 {
20         <S as Tr>::A::f::<u8> => {}
21         //~^ ERROR expected unit struct, unit variant or constant, found associated function
22         0 ..= <S as Tr>::A::f::<u8> => {}
23         //~^ ERROR only `char` and numeric types are allowed in range
24     }
25 }