mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 12:36:35 +03:00
f0845adb0c
```
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> $DIR/attempted-access-non-fatal.rs:7:15
|
LL | let _ = 2.l;
| ^
|
help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix
|
LL - let _ = 2.l;
LL + let _ = 2.0f64;
|
```
28 lines
1.1 KiB
Plaintext
28 lines
1.1 KiB
Plaintext
error[E0308]: mismatched types
|
|
--> $DIR/shadowed-lplace-method.rs:9:24
|
|
|
|
|
LL | *rc.borrow_mut() = false;
|
|
| ---------------- ^^^^^ expected `Rc<RefCell<bool>>`, found `bool`
|
|
| |
|
|
| expected due to the type of this binding
|
|
|
|
|
= note: expected struct `Rc<RefCell<bool>>`
|
|
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<T>`
|
|
--> $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 - *rc.borrow_mut() = false;
|
|
LL + *std::cell::RefCell::<_>::borrow_mut(&rc) = false;
|
|
|
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|