rust/tests/ui/nll/relate_tys/opaque-hrtb.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
246 B
Rust
Raw Normal View History

trait MyTrait<T> {}
struct Foo;
impl<T> MyTrait<T> for Foo {}
fn bar<Input>() -> impl MyTrait<Input> {
Foo
}
fn foo() -> impl for<'a> MyTrait<&'a str> {
bar() //~ ERROR implementation of `MyTrait` is not general enough
}
fn main() {}