Last active
December 13, 2018 17:09
-
-
Save vijairaj/ec18d2dd3854c115b18e039c8a97f62d to your computer and use it in GitHub Desktop.
Rust compiler errors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| | |
13 | let x, y = 21, 22; | |
| -^-- help: try adding parentheses: `(x, y)` | |
---- | |
| | |
24 | println!("val {:?} {:?} {:?}", pt, pt2, pt3); | |
| ^^ did you mean `pt1`? | |
---- | |
error[E0499]: cannot borrow `vec` as mutable more than once at a time | |
--> src/main.rs:5:9 | |
| | |
4 | for n in &mut vec { | |
| -------- | |
| | | |
| first mutable borrow occurs here | |
| first borrow used here, in later iteration of loop | |
5 | vec.push(*n * 10); | |
| ^^^ second mutable borrow occurs here | |
---- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment