]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/issue-92015.rs
Rollup merge of #106323 - starkat99:stabilize-f16c_target_feature, r=petrochenkov
[rust.git] / tests / 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 }