Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Compiling irc_rs v0.1.0 (file:///Users/tyler/Documents/irc_rs)
- main.rs:22:36: 22:38 error: cannot borrow `lp` as immutable because it is also borrowed as mutable
- main.rs:22 println!("{:?} {:?} {:?}", lp.prefix(), lp.command(), lp.params());
- ^~
- note: in expansion of format_args!
- <std macros>:2:25: 2:56 note: expansion site
- <std macros>:1:1: 2:62 note: in expansion of print!
- <std macros>:3:1: 3:54 note: expansion site
- <std macros>:1:1: 3:58 note: in expansion of println!
- main.rs:22:9: 22:76 note: expansion site
- note: in expansion of for loop expansion
- main.rs:18:2: 23:3 note: expansion site
- main.rs:21:9: 21:11 note: previous borrow of `lp` occurs here; the mutable borrow prevents subsequent moves, borrows, or modification of `lp` until the borrow ends
- main.rs:21 lp.parse(linestr);
- ^~
- note: in expansion of for loop expansion
- main.rs:18:2: 23:3 note: expansion site
- main.rs:23:3: 23:3 note: previous borrow ends here
- main.rs:18 for line in rbuf.lines() {
- main.rs:19 let mut lp = parser::Line::new();
- main.rs:20 let linestr = line.ok().unwrap();
- main.rs:21 lp.parse(linestr);
- main.rs:22 println!("{:?} {:?} {:?}", lp.prefix(), lp.command(), lp.params());
- main.rs:23 }
- ^
- main.rs:22:49: 22:51 error: cannot borrow `lp` as immutable because it is also borrowed as mutable
- main.rs:22 println!("{:?} {:?} {:?}", lp.prefix(), lp.command(), lp.params());
- ^~
- note: in expansion of format_args!
- <std macros>:2:25: 2:56 note: expansion site
- <std macros>:1:1: 2:62 note: in expansion of print!
- <std macros>:3:1: 3:54 note: expansion site
- <std macros>:1:1: 3:58 note: in expansion of println!
- main.rs:22:9: 22:76 note: expansion site
- note: in expansion of for loop expansion
- main.rs:18:2: 23:3 note: expansion site
- main.rs:21:9: 21:11 note: previous borrow of `lp` occurs here; the mutable borrow prevents subsequent moves, borrows, or modification of `lp` until the borrow ends
- main.rs:21 lp.parse(linestr);
- ^~
- note: in expansion of for loop expansion
- main.rs:18:2: 23:3 note: expansion site
- main.rs:23:3: 23:3 note: previous borrow ends here
- main.rs:18 for line in rbuf.lines() {
- main.rs:19 let mut lp = parser::Line::new();
- main.rs:20 let linestr = line.ok().unwrap();
- main.rs:21 lp.parse(linestr);
- main.rs:22 println!("{:?} {:?} {:?}", lp.prefix(), lp.command(), lp.params());
- main.rs:23 }
- ^
- main.rs:22:63: 22:65 error: cannot borrow `lp` as immutable because it is also borrowed as mutable
- main.rs:22 println!("{:?} {:?} {:?}", lp.prefix(), lp.command(), lp.params());
- ^~
- note: in expansion of format_args!
- <std macros>:2:25: 2:56 note: expansion site
- <std macros>:1:1: 2:62 note: in expansion of print!
- <std macros>:3:1: 3:54 note: expansion site
- <std macros>:1:1: 3:58 note: in expansion of println!
- main.rs:22:9: 22:76 note: expansion site
- note: in expansion of for loop expansion
- main.rs:18:2: 23:3 note: expansion site
- main.rs:21:9: 21:11 note: previous borrow of `lp` occurs here; the mutable borrow prevents subsequent moves, borrows, or modification of `lp` until the borrow ends
- main.rs:21 lp.parse(linestr);
- ^~
- note: in expansion of for loop expansion
- main.rs:18:2: 23:3 note: expansion site
- main.rs:23:3: 23:3 note: previous borrow ends here
- main.rs:18 for line in rbuf.lines() {
- main.rs:19 let mut lp = parser::Line::new();
- main.rs:20 let linestr = line.ok().unwrap();
- main.rs:21 lp.parse(linestr);
- main.rs:22 println!("{:?} {:?} {:?}", lp.prefix(), lp.command(), lp.params());
- main.rs:23 }
- ^
- error: aborting due to 3 previous errors
- Could not compile `irc_rs`.
- To learn more, run the command again with --verbose.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement