summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.rs
blob: 998a48ce20c2649904eb68f2aeaad94a13a6fc2a (plain)
1
2
3
4
5
6
7
8
9
struct Ref<'a, T: 'a> {
    data: &'a T
}

fn foo<'a>(x: Ref<i32>, y: &mut Vec<Ref<'a, i32>>) {
    y.push(x); //~ ERROR explicit lifetime
}

fn main() { }