Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![allow(unreachable_code)]
- fn main() {
- println!("{:?}", {
- let str = String::new(); let split = str.split(' '); let (a, b, c) = (split.next(), split.next(), split.next()); format!("{:?}", (a, b, c));
- });
- }
- /* ~~~~=== stderr ===~~~~
- Compiling playground v0.0.1 (/playground)
- error[E0596]: cannot borrow `split` as mutable, as it is not declared as mutable
- --> src/main.rs:6:79
- |
- 6 | let str = String::new(); let split = str.split(' '); let (a, b, c) = (split.next(), split.next(), split.next()); format!("{:?}", (a, b, c));
- | ----- ^^^^^ cannot borrow as mutable
- | |
- | help: consider changing this to be mutable: `mut split`
- error[E0596]: cannot borrow `split` as mutable, as it is not declared as mutable
- --> src/main.rs:6:93
- |
- 6 | let str = String::new(); let split = str.split(' '); let (a, b, c) = (split.next(), split.next(), split.next()); format!("{:?}", (a, b, c));
- | ----- ^^^^^ cannot borrow as mutable
- | |
- | help: consider changing this to be mutable: `mut split`
- error[E0596]: cannot borrow `split` as mutable, as it is not declared as mutable
- --> src/main.rs:6:107
- |
- 6 | let str = String::new(); let split = str.split(' '); let (a, b, c) = (split.next(), split.next(), split.next()); format!("{:?}", (a, b, c));
- | ----- help: consider changing this to be mutable: `mut split` ^^^^^ cannot borrow as mutable
- error: aborting due to 3 previous errors
- For more information about this error, try `rustc --explain E0596`.
- error: Could not compile `playground`.
- To learn more, run the command again with --verbose.
- */
- /* ~~~~=== stdout ===~~~~
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement