]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/issue-92015.rs
Sync portable-simd to rust-lang/portable-simd@72df4c45056a8bc0d1b3f06fdc828722177f0763
[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 }