LL | foo(s);
| ^
| |
- | expected struct `std::string::String`, found `&std::string::String`
+ | expected struct `String`, found `&String`
| help: try using a conversion method: `s.to_string()`
error[E0308]: mismatched types
LL | foo(&"aaa".to_owned());
| ^^^^^^^^^^^^^^^^^
| |
- | expected struct `std::string::String`, found `&std::string::String`
+ | expected struct `String`, found `&String`
| help: consider removing the borrow: `"aaa".to_owned()`
error[E0308]: mismatched types
LL | foo(&mut "aaa".to_owned());
| ^^^^^^^^^^^^^^^^^^^^^
| |
- | expected struct `std::string::String`, found `&mut std::string::String`
+ | expected struct `String`, found `&mut String`
| help: consider removing the borrow: `"aaa".to_owned()`
error[E0308]: mismatched types