]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.rs
Auto merge of #95454 - randomicon00:fix95444, r=wesleywiser
[rust.git] / src / test / ui / type-alias-impl-trait / impl-with-unconstrained-param.rs
1 // Ensure that we don't ICE if associated type impl trait is used in an impl
2 // with an unconstrained type parameter.
3
4 #![feature(type_alias_impl_trait)]
5
6 trait X {
7     type I;
8     fn f() -> Self::I;
9 }
10
11 impl<T> X for () {
12     //~^ ERROR the type parameter `T` is not constrained
13     type I = impl Sized;
14     fn f() -> Self::I {}
15 }
16
17 fn main() {}