]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-19850.rs
Auto merge of #57108 - Mark-Simulacrum:license-remove, r=pietroalbini
[rust.git] / src / test / ui / issues / issue-19850.rs
1 // compile-pass
2 #![allow(unused_variables)]
3 // Test that `<Type as Trait>::Output` and `Self::Output` are accepted as type annotations in let
4 // bindings
5
6 // pretty-expanded FIXME #23616
7
8 trait Int {
9     fn one() -> Self;
10     fn leading_zeros(self) -> usize;
11 }
12
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();
19     }
20 }
21
22 fn main() {}