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