2017-05-02 12:33:10 -05:00
|
|
|
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 () {
|
2022-04-19 05:56:18 -05:00
|
|
|
Foo::<'a, 'b>::xmute(u)
|
2022-04-01 12:13:25 -05:00
|
|
|
//~^ ERROR lifetime may not live long enough
|
2017-05-02 12:33:10 -05:00
|
|
|
}
|
|
|
|
|
2017-12-29 12:25:40 -06:00
|
|
|
fn main() {}
|