summaryrefslogtreecommitdiffstats
path: root/tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.rs
blob: d18b50d0d0cd78724c0673b37685f5dc4a018537 (plain)
1
2
3
4
5
6
7
8
9
10
11
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() {
}