rust/tests/ui/lint/elided-named-lifetimes/example-from-issue48686.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
224 B
Rust
Raw Normal View History

#![deny(elided_named_lifetimes)]
struct Foo;
impl Foo {
pub fn get_mut(&'static self, x: &mut u8) -> &mut u8 {
//~^ ERROR elided lifetime has a name
unsafe { &mut *(x as *mut _) }
}
}
fn main() {}