rust/tests/ui/impl-trait/in-trait/unconstrained-lt.rs

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

14 lines
235 B
Rust
Raw Normal View History

trait Foo {
fn test() -> impl Sized;
}
impl<'a, T> Foo for T {
//~^ ERROR the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
fn test() -> &'a () {
&()
}
}
fn main() {}