]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/return-ref-mut-issue-46557.rs
Rollup merge of #105216 - GuillaumeGomez:rm-unused-gui-test, r=notriddle
[rust.git] / src / test / ui / nll / return-ref-mut-issue-46557.rs
1 // Regression test for issue #46557
2
3 fn gimme_static_mut() -> &'static mut u32 {
4     let ref mut x = 1234543;
5     x //~ ERROR cannot return value referencing temporary value [E0515]
6 }
7
8 fn main() {}