rust/tests/ui/suggestions/shadowed-lplace-method.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
214 B
Rust
Raw Normal View History

//@ 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
}