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

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

fn main() { }