mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
8 lines
213 B
Rust
8 lines
213 B
Rust
use std::cell::Cell;
|
|
use std::panic::catch_unwind;
|
|
fn main() {
|
|
let mut x = Cell::new(22);
|
|
catch_unwind(|| { x.set(23); });
|
|
//~^ ERROR the type `UnsafeCell<i32>` may contain interior mutability and a
|
|
}
|