We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fn main() { let a = String::from("hello"); print(a); } fn print(input: &str) { println!("{}", input); }
error[E0308]: mismatched types --> src/main.rs:3:11 | 3 | print(a); | ^ | | | expected &str, found struct `std::string::String` | help: consider borrowing here: `&a` | = note: expected type `&str` found type `std::string::String` error: aborting due to previous error
The correct fix is already suggested, it would be great if cargo fix could apply that to the codebase.
cargo 1.29.0-nightly (2cd36b4ed 2018-07-25)
The text was updated successfully, but these errors were encountered:
Duplicate of #5846
Sorry, something went wrong.
Indeed!
No branches or pull requests
The correct fix is already suggested, it would be great if cargo fix could apply that to the codebase.
The text was updated successfully, but these errors were encountered: