From a4b7ed7a42c716ab9f05e351f003d589124fd55d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:58 +0200 Subject: Adding upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/suggestions/shadowed-lplace-method.stderr | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/ui/suggestions/shadowed-lplace-method.stderr (limited to 'tests/ui/suggestions/shadowed-lplace-method.stderr') diff --git a/tests/ui/suggestions/shadowed-lplace-method.stderr b/tests/ui/suggestions/shadowed-lplace-method.stderr new file mode 100644 index 000000000..91d0d1200 --- /dev/null +++ b/tests/ui/suggestions/shadowed-lplace-method.stderr @@ -0,0 +1,26 @@ +error[E0308]: mismatched types + --> $DIR/shadowed-lplace-method.rs:9:24 + | +LL | *rc.borrow_mut() = false; + | ---------------- ^^^^^ expected struct `Rc`, found `bool` + | | + | expected due to the type of this binding + | + = note: expected struct `Rc>` + found type `bool` +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` + --> $DIR/shadowed-lplace-method.rs:9:9 + | +LL | use std::borrow::BorrowMut; + | ---------------------- `std::borrow::BorrowMut` imported here +... +LL | *rc.borrow_mut() = false; + | ^^^^^^^^^^ refers to `std::borrow::BorrowMut::borrow_mut` +help: you might have meant to call the other method; you can use the fully-qualified path to call it explicitly + | +LL | *std::cell::RefCell::<_>::borrow_mut(&rc) = false; + | +++++++++++++++++++++++++++++++++++++ ~ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0308`. -- cgit v1.2.3