blob: ed94ebd27ffdf0c3033417d886778cd10064084f [file] [edit]
error[E0308]: mismatched types
--> $DIR/only-suggest-removal-of-conversion-method-calls.rs:9:5
|
LL | fn get_name() -> String {
| ------ expected `String` because of return type
...
LL | your_name.trim()
| ^^^^^^^^^^^^^^^^ expected `String`, found `&str`
|
help: try using a conversion method
|
LL | your_name.trim().to_string()
| ++++++++++++
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.