mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
11 lines
214 B
Rust
11 lines
214 B
Rust
|
//@ run-rustfix
|
||
|
#![allow(unused_imports)]
|
||
|
use std::borrow::BorrowMut;
|
||
|
use std::cell::RefCell;
|
||
|
use std::rc::Rc;
|
||
|
|
||
|
fn main() {
|
||
|
let rc = Rc::new(RefCell::new(true));
|
||
|
*rc.borrow_mut() = false; //~ ERROR E0308
|
||
|
}
|