rust/tests/ui/nll/where_clauses_in_functions.rs

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

16 lines
259 B
Rust
Raw Normal View History

2017-11-27 15:25:01 +00:00
#![allow(dead_code)]
fn foo<'a, 'b>(x: &'a u32, y: &'b u32) -> (&'a u32, &'b u32)
where
'a: 'b,
{
(x, y)
}
fn bar<'a, 'b>(x: &'a u32, y: &'b u32) -> (&'a u32, &'b u32) {
foo(x, y)
2018-12-11 21:49:40 +00:00
//~^ ERROR lifetime may not live long enough
2017-11-27 15:25:01 +00:00
}
fn main() {}