mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
16 lines
259 B
Rust
16 lines
259 B
Rust
#![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)
|
|
//~^ ERROR lifetime may not live long enough
|
|
}
|
|
|
|
fn main() {}
|