mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
14 lines
267 B
Rust
14 lines
267 B
Rust
struct Foo<'a, 'b: 'a>(&'a &'b ());
|
|
|
|
impl<'a, 'b> Foo<'a, 'b> {
|
|
fn xmute(a: &'b ()) -> &'a () {
|
|
unreachable!()
|
|
}
|
|
}
|
|
|
|
pub fn foo<'a, 'b>(u: &'b ()) -> &'a () {
|
|
Foo::<'a, 'b>::xmute(u)
|
|
//~^ ERROR lifetime may not live long enough
|
|
}
|
|
|
|
fn main() {}
|