summaryrefslogtreecommitdiffstats
path: root/src/test/ui/suggestions/suggest-adding-reference-to-trait-assoc-item.stderr
blob: 125a8b44f2f0a257ee7173c41d6f075fbd43aede (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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`.