Advertisement
tyler569

compile err

May 21st, 2015
431
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.93 KB | None | 0 0
  1. Compiling irc_rs v0.1.0 (file:///Users/tyler/Documents/irc_rs)
  2. main.rs:22:36: 22:38 error: cannot borrow `lp` as immutable because it is also borrowed as mutable
  3. main.rs:22 println!("{:?} {:?} {:?}", lp.prefix(), lp.command(), lp.params());
  4. ^~
  5. note: in expansion of format_args!
  6. <std macros>:2:25: 2:56 note: expansion site
  7. <std macros>:1:1: 2:62 note: in expansion of print!
  8. <std macros>:3:1: 3:54 note: expansion site
  9. <std macros>:1:1: 3:58 note: in expansion of println!
  10. main.rs:22:9: 22:76 note: expansion site
  11. note: in expansion of for loop expansion
  12. main.rs:18:2: 23:3 note: expansion site
  13. 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
  14. main.rs:21 lp.parse(linestr);
  15. ^~
  16. note: in expansion of for loop expansion
  17. main.rs:18:2: 23:3 note: expansion site
  18. main.rs:23:3: 23:3 note: previous borrow ends here
  19. main.rs:18 for line in rbuf.lines() {
  20. main.rs:19 let mut lp = parser::Line::new();
  21. main.rs:20 let linestr = line.ok().unwrap();
  22. main.rs:21 lp.parse(linestr);
  23. main.rs:22 println!("{:?} {:?} {:?}", lp.prefix(), lp.command(), lp.params());
  24. main.rs:23 }
  25. ^
  26. main.rs:22:49: 22:51 error: cannot borrow `lp` as immutable because it is also borrowed as mutable
  27. main.rs:22 println!("{:?} {:?} {:?}", lp.prefix(), lp.command(), lp.params());
  28. ^~
  29. note: in expansion of format_args!
  30. <std macros>:2:25: 2:56 note: expansion site
  31. <std macros>:1:1: 2:62 note: in expansion of print!
  32. <std macros>:3:1: 3:54 note: expansion site
  33. <std macros>:1:1: 3:58 note: in expansion of println!
  34. main.rs:22:9: 22:76 note: expansion site
  35. note: in expansion of for loop expansion
  36. main.rs:18:2: 23:3 note: expansion site
  37. 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
  38. main.rs:21 lp.parse(linestr);
  39. ^~
  40. note: in expansion of for loop expansion
  41. main.rs:18:2: 23:3 note: expansion site
  42. main.rs:23:3: 23:3 note: previous borrow ends here
  43. main.rs:18 for line in rbuf.lines() {
  44. main.rs:19 let mut lp = parser::Line::new();
  45. main.rs:20 let linestr = line.ok().unwrap();
  46. main.rs:21 lp.parse(linestr);
  47. main.rs:22 println!("{:?} {:?} {:?}", lp.prefix(), lp.command(), lp.params());
  48. main.rs:23 }
  49. ^
  50. main.rs:22:63: 22:65 error: cannot borrow `lp` as immutable because it is also borrowed as mutable
  51. main.rs:22 println!("{:?} {:?} {:?}", lp.prefix(), lp.command(), lp.params());
  52. ^~
  53. note: in expansion of format_args!
  54. <std macros>:2:25: 2:56 note: expansion site
  55. <std macros>:1:1: 2:62 note: in expansion of print!
  56. <std macros>:3:1: 3:54 note: expansion site
  57. <std macros>:1:1: 3:58 note: in expansion of println!
  58. main.rs:22:9: 22:76 note: expansion site
  59. note: in expansion of for loop expansion
  60. main.rs:18:2: 23:3 note: expansion site
  61. 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
  62. main.rs:21 lp.parse(linestr);
  63. ^~
  64. note: in expansion of for loop expansion
  65. main.rs:18:2: 23:3 note: expansion site
  66. main.rs:23:3: 23:3 note: previous borrow ends here
  67. main.rs:18 for line in rbuf.lines() {
  68. main.rs:19 let mut lp = parser::Line::new();
  69. main.rs:20 let linestr = line.ok().unwrap();
  70. main.rs:21 lp.parse(linestr);
  71. main.rs:22 println!("{:?} {:?} {:?}", lp.prefix(), lp.command(), lp.params());
  72. main.rs:23 }
  73. ^
  74. error: aborting due to 3 previous errors
  75. Could not compile `irc_rs`.
  76.  
  77. To learn more, run the command again with --verbose.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement