summaryrefslogtreecommitdiffstats
path: root/tests/ui/nll/where_clauses_in_structs.rs
blob: fae5d3811ecd2237cf9dccc0d46c5ead288db3b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#![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() {}