mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
16 lines
252 B
Rust
16 lines
252 B
Rust
#![allow(dead_code)]
|
|
|
|
use std::cell::Cell;
|
|
|
|
struct Foo<'a: 'b, 'b> {
|
|
x: Cell<&'a u32>,
|
|
y: Cell<&'b u32>,
|
|
}
|
|
|
|
fn bar<'a, 'b>(x: Cell<&'a u32>, y: Cell<&'b u32>) {
|
|
Foo { x, y };
|
|
//~^ ERROR lifetime may not live long enough
|
|
}
|
|
|
|
fn main() {}
|