fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.1 KiB26 linesraw
1error[E0308]: mismatched types
2  --> $DIR/shadowed-lplace-method.rs:9:24
3   |
4LL |     *rc.borrow_mut() = false;
5   |     ----------------   ^^^^^ expected `Rc<RefCell<bool>>`, found `bool`
6   |     |
7   |     expected due to the type of this binding
8   |
9   = note: expected struct `Rc<RefCell<bool>>`
10                found type `bool`
11note: 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   |
14LL | use std::borrow::BorrowMut;
15   |     ---------------------- `std::borrow::BorrowMut` imported here
16...
17LL |     *rc.borrow_mut() = false;
18   |         ^^^^^^^^^^ refers to `std::borrow::BorrowMut::borrow_mut`
19help: you might have meant to call the other method; you can use the fully-qualified path to call it explicitly
20   |
21LL |     *std::cell::RefCell::<_>::borrow_mut(&rc) = false;
22   |      +++++++++++++++++++++++++++++++++++++  ~
23
24error: aborting due to previous error
25
26For more information about this error, try `rustc --explain E0308`.