rust/tests/ui/nll/issue-95272.rs

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

16 lines
245 B
Rust
Raw Normal View History

use std::cell::Cell;
fn check<'a, 'b>(x: Cell<&'a ()>, y: Cell<&'b ()>)
where
'a: 'b,
{
}
fn test<'a, 'b>(x: Cell<&'a ()>, y: Cell<&'b ()>) {
let f = check;
//~^ ERROR lifetime may not live long enough
f(x, y);
}
fn main() {}