rust/tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.rs

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

12 lines
209 B
Rust
Raw Normal View History

2017-08-25 06:21:22 +00:00
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>
{
2017-11-20 12:13:27 +00:00
x.push(y); //~ ERROR explicit lifetime required
2017-08-25 06:21:22 +00:00
}
fn main() {
}