rust/tests/ui/suggestions/shadowed-lplace-method.fixed
2024-02-16 20:02:50 +00:00

11 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
}