]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-36400.rs
Rollup merge of #91804 - woppopo:const_clone, r=oli-obk
[rust.git] / src / test / ui / issues / issue-36400.rs
1 fn f(x: &mut u32) {}
2
3 fn main() {
4     let x = Box::new(3);
5     f(&mut *x); //~ ERROR cannot borrow `*x` as mutable, as `x` is not declared as mutable
6 }