mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
10 lines
239 B
Rust
10 lines
239 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));
|
|
*std::cell::RefCell::<_>::borrow_mut(&rc) = false; //~ ERROR E0308
|
|
}
|