add test for trait alias projections

This commit is contained in:
Deadbeef 2025-08-04 16:11:59 +08:00
parent 82f174fbd9
commit 9deb3e440e

View file

@ -0,0 +1,21 @@
use crate::tests::check_types;
#[test]
fn projection() {
check_types(
r#"
#![feature(trait_alias)]
pub trait A {
type Output;
}
pub trait B = A<Output = u32>;
pub fn a<T: B>(x: T::Output) {
x;
// ^ u32
}
"#,
);
}