rust/tests/ui/nll/return-ref-mut-issue-46557.rs
2023-01-11 09:32:08 +00:00

9 lines
198 B
Rust

// Regression test for issue #46557
fn gimme_static_mut() -> &'static mut u32 {
let ref mut x = 1234543;
x //~ ERROR cannot return value referencing temporary value [E0515]
}
fn main() {}