Skip to content

Commit 7bb389b

Browse files
committed
add test for trait alias projections
1 parent fbc3e93 commit 7bb389b

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
use crate::tests::check_types;
2+
3+
#[test]
4+
fn projection() {
5+
check_types(
6+
r#"
7+
#![feature(trait_alias)]
8+
9+
pub trait A {
10+
type Output;
11+
}
12+
13+
pub trait B = A<Output = u32>;
14+
15+
pub fn a<T: B>(x: T::Output) {
16+
x;
17+
// ^ u32
18+
}
19+
"#,
20+
);
21+
}

0 commit comments

Comments
 (0)