summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/suggest-remove-deref.stderr
blob: 4253838eb5265f1f9a803a13a1ecc52cd069afe8 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
error[E0308]: mismatched types
  --> $DIR/suggest-remove-deref.rs:13:9
   |
LL |     foo(*hello);
   |     --- ^^^^^^ expected `&_`, found `S`
   |     |
   |     arguments to this function are incorrect
   |
   = note: expected reference `&_`
                 found struct `S`
note: function defined here
  --> $DIR/suggest-remove-deref.rs:10:4
   |
LL | fn foo<T: X>(_: &T) {}
   |    ^^^       -----
help: consider removing deref here
   |
LL -     foo(*hello);
LL +     foo(hello);
   |

error[E0308]: mismatched types
  --> $DIR/suggest-remove-deref.rs:21:9
   |
LL |     bar(*s);
   |     --- ^^ expected `&String`, found `String`
   |     |
   |     arguments to this function are incorrect
   |
note: function defined here
  --> $DIR/suggest-remove-deref.rs:17:4
   |
LL | fn bar(_: &String) {}
   |    ^^^ ----------
help: consider removing deref here
   |
LL -     bar(*s);
LL +     bar(s);
   |

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0308`.