error[E0308]: mismatched types | |
--> $DIR/mismatched-types-ref-binding.rs:7:30 | |
| | |
LL | let ref string: String = var; | |
| ^^^ expected `String`, found `i32` | |
| | |
help: try using a conversion method | |
| | |
LL | let ref string: String = var.to_string(); | |
| ++++++++++++ | |
error: aborting due to 1 previous error | |
For more information about this error, try `rustc --explain E0308`. |