mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
a9841936fe
Change the implicit `Sized` `Obligation` `Span` for call expressions to include the whole expression. This aids the existing deduplication machinery to reduce the number of errors caused by a single unsized expression.
26 lines
819 B
Plaintext
26 lines
819 B
Plaintext
error[E0277]: the trait bound `&mut usize: Default` is not satisfied
|
|
--> $DIR/suggest-adding-reference-to-trait-assoc-item.rs:13:9
|
|
|
|
|
LL | foo(Default::default());
|
|
| ^^^^^^^^^^^^^^^^^^ the trait `Default` is not implemented for `&mut usize`
|
|
|
|
|
help: consider mutably borrowing here
|
|
|
|
|
LL | foo(&mut Default::default());
|
|
| ++++
|
|
|
|
error[E0277]: the trait bound `&usize: Default` is not satisfied
|
|
--> $DIR/suggest-adding-reference-to-trait-assoc-item.rs:14:9
|
|
|
|
|
LL | bar(Default::default());
|
|
| ^^^^^^^^^^^^^^^^^^ the trait `Default` is not implemented for `&usize`
|
|
|
|
|
help: consider borrowing here
|
|
|
|
|
LL | bar(&Default::default());
|
|
| +
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|