rust/tests/ui/lint/elided-named-lifetimes/example-from-issue48686.rs
2024-08-31 15:35:42 +03:00

13 lines
224 B
Rust

#![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() {}