]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/where_clauses_in_structs.rs
Rollup merge of #103644 - catlee:catlee/option-question-mark-docs, r=workingjubilee
[rust.git] / src / test / ui / nll / where_clauses_in_structs.rs
1 #![allow(dead_code)]
2
3 use std::cell::Cell;
4
5 struct Foo<'a: 'b, 'b> {
6     x: Cell<&'a u32>,
7     y: Cell<&'b u32>,
8 }
9
10 fn bar<'a, 'b>(x: Cell<&'a u32>, y: Cell<&'b u32>) {
11     Foo { x, y };
12     //~^ ERROR lifetime may not live long enough
13 }
14
15 fn main() {}