blob: 0eb3d89c590f422aee8186a1f6818689f7d28498 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
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() {}
|