]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/suggest-adding-reference-to-trait-assoc-item.stderr
Rollup merge of #104672 - Voultapher:unify-sort-modules, r=thomcc
[rust.git] / tests / ui / suggestions / suggest-adding-reference-to-trait-assoc-item.stderr
1 error[E0277]: the trait bound `&mut usize: Default` is not satisfied
2   --> $DIR/suggest-adding-reference-to-trait-assoc-item.rs:13:9
3    |
4 LL |     foo(Default::default());
5    |         ^^^^^^^^^^^^^^^^ the trait `Default` is not implemented for `&mut usize`
6    |
7 help: consider mutably borrowing here
8    |
9 LL |     foo(&mut Default::default());
10    |         ++++
11
12 error[E0277]: the trait bound `&usize: Default` is not satisfied
13   --> $DIR/suggest-adding-reference-to-trait-assoc-item.rs:14:9
14    |
15 LL |     bar(Default::default());
16    |         ^^^^^^^^^^^^^^^^ the trait `Default` is not implemented for `&usize`
17    |
18 help: consider borrowing here
19    |
20 LL |     bar(&Default::default());
21    |         +
22
23 error: aborting due to 2 previous errors
24
25 For more information about this error, try `rustc --explain E0277`.