blob: 9162a38f51099f6397696d9f9ef31ff500f065cd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#![deny(mismatched_lifetime_syntaxes)]
struct Foo;
impl Foo {
pub fn get_mut(&'static self, x: &mut u8) -> &mut u8 {
//~^ ERROR eliding a lifetime that's named elsewhere is confusing
unsafe { &mut *(x as *mut _) }
}
}
fn main() {}
|