]>
Commit | Line | Data |
---|---|---|
d9bb1a4e | 1 | // check-pass |
0bf4aa26 | 2 | #![allow(unused_variables)] |
1a4d82fc JJ |
3 | // Test that `<Type as Trait>::Output` and `Self::Output` are accepted as type annotations in let |
4 | // bindings | |
5 | ||
c34b1796 AL |
6 | // pretty-expanded FIXME #23616 |
7 | ||
1a4d82fc JJ |
8 | trait Int { |
9 | fn one() -> Self; | |
c34b1796 | 10 | fn leading_zeros(self) -> usize; |
223e47cc LB |
11 | } |
12 | ||
1a4d82fc JJ |
13 | trait Foo { |
14 | type T : Int; | |
15 | ||
16 | fn test(&self) { | |
17 | let r: <Self as Foo>::T = Int::one(); | |
18 | let r: Self::T = Int::one(); | |
223e47cc | 19 | } |
223e47cc LB |
20 | } |
21 | ||
22 | fn main() {} |