Sign in
fuchsia
/
third_party
/
rust
/
cfcc5c296ed6fabcc8b9d380eaaea8a7352299fd
/
.
/
src
/
test
/
ui
/
interior-mutability
/
interior-mutability.rs
blob: ddc882cccf3907a80a547b4cf3a6ac515e6014f6 [
file
] [
log
] [
blame
]
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 `std::cell::UnsafeCell<i32>` may contain interior mutability and a
}