rust/tests/ui/impl-trait/issues/issue-87340.rs
2023-01-11 09:32:08 +00:00

15 lines
247 B
Rust

#![feature(type_alias_impl_trait)]
trait X {
type I;
fn f() -> Self::I;
}
impl<T> X for () {
//~^ ERROR `T` is not constrained by the impl trait, self type, or predicates
type I = impl Sized;
fn f() -> Self::I {}
}
fn main() {}