1 error[E0308]: mismatched types
2 --> $DIR/deref-suggestion.rs:8:9
7 | expected struct `String`, found `&String`
8 | help: try using a conversion method: `s.to_string()`
10 error[E0308]: mismatched types
11 --> $DIR/deref-suggestion.rs:14:10
16 | expected `u32`, found `&u32`
17 | help: consider dereferencing the borrow: `*u`
19 error[E0308]: mismatched types
20 --> $DIR/deref-suggestion.rs:30:9
22 LL | foo(&"aaa".to_owned());
25 | expected struct `String`, found `&String`
26 | help: consider removing the borrow: `"aaa".to_owned()`
28 error[E0308]: mismatched types
29 --> $DIR/deref-suggestion.rs:32:9
31 LL | foo(&mut "aaa".to_owned());
32 | ^^^^^^^^^^^^^^^^^^^^^
34 | expected struct `String`, found `&mut String`
35 | help: consider removing the borrow: `"aaa".to_owned()`
37 error[E0308]: mismatched types
38 --> $DIR/deref-suggestion.rs:2:20
40 LL | ($x:expr) => { &$x }
41 | ^^^ expected `u32`, found `&{integer}`
43 LL | foo3(borrow!(0));
44 | ---------- in this macro invocation
46 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
48 error[E0308]: mismatched types
49 --> $DIR/deref-suggestion.rs:36:5
51 LL | assert_eq!(3i32, &3i32);
52 | ^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `&i32`
54 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
56 error[E0308]: mismatched types
57 --> $DIR/deref-suggestion.rs:39:17
62 | expected `&u32`, found integer
63 | help: consider borrowing here: `u: &u`
65 error[E0308]: mismatched types
66 --> $DIR/deref-suggestion.rs:41:20
68 LL | let s = S { u: u };
71 | expected `&u32`, found integer
72 | help: consider borrowing here: `&u`
74 error[E0308]: mismatched types
75 --> $DIR/deref-suggestion.rs:44:17
80 | expected `u32`, found `&{integer}`
81 | help: consider dereferencing the borrow: `i: *i`
83 error[E0308]: mismatched types
84 --> $DIR/deref-suggestion.rs:46:20
86 LL | let r = R { i: i };
89 | expected `u32`, found `&{integer}`
90 | help: consider dereferencing the borrow: `*i`
92 error: aborting due to 10 previous errors
94 For more information about this error, try `rustc --explain E0308`.