2022-08-19 12:51:20 -05:00
|
|
|
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());
|
2022-08-20 22:52:08 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^ the trait `Default` is not implemented for `&mut usize`
|
2022-08-19 12:51:20 -05:00
|
|
|
|
|
|
|
|
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());
|
2022-08-20 22:52:08 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^ the trait `Default` is not implemented for `&usize`
|
2022-08-19 12:51:20 -05:00
|
|
|
|
|
|
|
|
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`.
|