]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/issue-92015.rs
Merge commit 'd3a2366ee877075c59b38bd8ced55f224fc7ef51' into sync_cg_clif-2022-07-26
[rust.git] / src / test / ui / borrowck / issue-92015.rs
1 // Regression test for #92105.
2 // ICE when mutating immutable reference from last statement of a block.
3
4 fn main() {
5     let foo = Some(&0).unwrap();
6     *foo = 1; //~ ERROR cannot assign
7 }