1 error[E0308]: mismatched types
2 --> $DIR/deref-suggestion.rs:18:9
5 | ^ expected struct `std::string::String`, found reference
7 = note: expected type `std::string::String`
8 found type `&std::string::String`
9 = help: here are some functions which might fulfill your needs:
13 - .to_ascii_lowercase()
14 - .to_ascii_uppercase()
16 error[E0308]: mismatched types
17 --> $DIR/deref-suggestion.rs:23:10
20 | ^ expected u32, found &u32
22 = note: expected type `u32`
26 error[E0308]: mismatched types
27 --> $DIR/deref-suggestion.rs:30:9
29 30 | foo(&"aaa".to_owned());
30 | ^^^^^^^^^^^^^^^^^ expected struct `std::string::String`, found reference
32 = note: expected type `std::string::String`
33 found type `&std::string::String`
34 = help: try with `"aaa".to_owned()`
36 error[E0308]: mismatched types
37 --> $DIR/deref-suggestion.rs:31:9
39 31 | foo(&mut "aaa".to_owned());
40 | ^^^^^^^^^^^^^^^^^^^^^ expected struct `std::string::String`, found mutable reference
42 = note: expected type `std::string::String`
43 found type `&mut std::string::String`
44 = help: try with `"aaa".to_owned()`
46 error[E0308]: mismatched types
47 --> $DIR/deref-suggestion.rs:12:20
49 12 | ($x:expr) => { &$x }
50 | ^^^ expected u32, found &{integer}
52 32 | foo3(borrow!(0));
53 | ---------- in this macro invocation
55 = note: expected type `u32`
56 found type `&{integer}`
58 error: aborting due to 5 previous errors