rust/tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.rs
2023-01-11 09:32:08 +00:00

12 lines
209 B
Rust

trait Foo<'a> {}
impl<'a, T> Foo<'a> for T {}
fn baz<'a, 'b, T>(x: &mut Vec<&'a T>, y: &T)
where i32: Foo<'a>,
u32: Foo<'b>
{
x.push(y); //~ ERROR explicit lifetime required
}
fn main() {
}