rust/tests/ui/nll/where_clauses_in_structs.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
252 B
Rust
Raw Normal View History

2017-11-26 20:28:04 +00:00
#![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 };
2018-12-11 21:49:40 +00:00
//~^ ERROR lifetime may not live long enough
2017-11-26 20:28:04 +00:00
}
fn main() {}