error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:18:9 | 18 | foo(s); | ^ expected struct `std::string::String`, found reference | = note: expected type `std::string::String` found type `&std::string::String` = help: here are some functions which might fulfill your needs: - .escape_debug() - .escape_default() - .escape_unicode() - .to_lowercase() - .to_uppercase() error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:23:10 | 23 | foo3(u); | ^ expected u32, found &u32 | = note: expected type `u32` found type `&u32` = help: try with `*u` error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:30:9 | 30 | foo(&"aaa".to_owned()); | ^^^^^^^^^^^^^^^^^ expected struct `std::string::String`, found reference | = note: expected type `std::string::String` found type `&std::string::String` = help: try with `"aaa".to_owned()` error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:31:9 | 31 | foo(&mut "aaa".to_owned()); | ^^^^^^^^^^^^^^^^^^^^^ expected struct `std::string::String`, found mutable reference | = note: expected type `std::string::String` found type `&mut std::string::String` = help: try with `"aaa".to_owned()` error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:12:20 | 12 | ($x:expr) => { &$x } | ^^^ expected u32, found &{integer} ... 32 | foo3(borrow!(0)); | ---------- in this macro invocation | = note: expected type `u32` found type `&{integer}` error: aborting due to 5 previous errors