]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/shadowed-lplace-method.stderr
Rollup merge of #106174 - GuillaumeGomez:rm-unused-ayu-css-rules, r=notriddle
[rust.git] / src / test / ui / suggestions / shadowed-lplace-method.stderr
1 error[E0308]: mismatched types
2   --> $DIR/shadowed-lplace-method.rs:9:24
3    |
4 LL |     *rc.borrow_mut() = false;
5    |     ----------------   ^^^^^ expected struct `Rc`, found `bool`
6    |     |
7    |     expected due to the type of this binding
8    |
9    = note: expected struct `Rc<RefCell<bool>>`
10                 found type `bool`
11 note: the `borrow_mut` call is resolved to the method in `std::borrow::BorrowMut`, shadowing the method of the same name on the inherent impl for `std::cell::RefCell<T>`
12   --> $DIR/shadowed-lplace-method.rs:9:9
13    |
14 LL | use std::borrow::BorrowMut;
15    |     ---------------------- `std::borrow::BorrowMut` imported here
16 ...
17 LL |     *rc.borrow_mut() = false;
18    |         ^^^^^^^^^^ refers to `std::borrow::BorrowMut::borrow_mut`
19 help: you might have meant to call the other method; you can use the fully-qualified path to call it explicitly
20    |
21 LL |     *std::cell::RefCell::<_>::borrow_mut(&rc) = false;
22    |      +++++++++++++++++++++++++++++++++++++  ~
23
24 error: aborting due to previous error
25
26 For more information about this error, try `rustc --explain E0308`.