]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-19850.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / issues / issue-19850.rs
CommitLineData
60c5eb7d 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
8trait Int {
9 fn one() -> Self;
c34b1796 10 fn leading_zeros(self) -> usize;
223e47cc
LB
11}
12
1a4d82fc
JJ
13trait 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
22fn main() {}