rust/tests/ui/impl-trait/issues/issue-87340.rs
2024-03-07 06:27:09 +00:00

17 lines
332 B
Rust

#![feature(impl_trait_in_assoc_type)]
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 {}
//~^ ERROR type annotations needed
//~| ERROR type annotations needed
}
fn main() {}