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