mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
10 lines
156 B
Rust
10 lines
156 B
Rust
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() { }
|