]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/issue-92015.rs
Merge commit '63734fcdd718cca089f84c42f3a42c0096cfd431' into sync_cg_clif-2022-05-15
[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 }