Created
January 2, 2019 13:09
-
-
Save rgilton/d408bc4157fbdb967fe413aa5a386c65 to your computer and use it in GitHub Desktop.
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
-*- mode: compilation; default-directory: "~/proj/rust/beep/src/" -*- | |
Compilation started at Wed Jan 2 13:07:48 | |
cargo rustc --bin beep --message-format\=json -- --test | |
Compiling beep v0.1.0 (/home/rob/proj/rust/beep) | |
{"reason":"compiler-message","package_id":"beep 0.1.0 (path+file:///home/rob/proj/rust/beep)","target":{"kind":["bin"],"crate_types":["bin"],"name":"beep","src_path":"/home/rob/proj/rust/beep/src/main.rs","edition":"2018"},"message":{"message":"variable `x` is assigned to, but never used","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":21,"byte_end":22,"line_start":3,"line_end":3,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":" let x = 1;","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"#[warn(unused_variables)] on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"consider using `_x` instead","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"warning: variable `x` is assigned to, but never used\n --> src/main.rs:3:9\n |\n3 | let x = 1;\n | ^\n |\n = note: #[warn(unused_variables)] on by default\n = note: consider using `_x` instead\n\n"}} | |
{"reason":"compiler-message","package_id":"beep 0.1.0 (path+file:///home/rob/proj/rust/beep)","target":{"kind":["bin"],"crate_types":["bin"],"name":"beep","src_path":"/home/rob/proj/rust/beep/src/main.rs","edition":"2018"},"message":{"message":"value assigned to `x` is never read","code":{"code":"unused_assignments","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":32,"byte_end":33,"line_start":4,"line_end":4,"column_start":5,"column_end":6,"is_primary":true,"text":[{"text":" x += 1;","highlight_start":5,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"#[warn(unused_assignments)] on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"warning: value assigned to `x` is never read\n --> src/main.rs:4:5\n |\n4 | x += 1;\n | ^\n |\n = note: #[warn(unused_assignments)] on by default\n\n"}} | |
{"reason":"compiler-message","package_id":"beep 0.1.0 (path+file:///home/rob/proj/rust/beep)","target":{"kind":["bin"],"crate_types":["bin"],"name":"beep","src_path":"/home/rob/proj/rust/beep/src/main.rs","edition":"2018"},"message":{"message":"cannot assign twice to immutable variable `x`","code":{"code":"E0384","explanation":"\nThis error occurs when an attempt is made to reassign an immutable variable.\nFor example:\n\n```compile_fail,E0384\nfn main() {\n let x = 3;\n x = 5; // error, reassignment of immutable variable\n}\n```\n\nBy default, variables in Rust are immutable. To fix this error, add the keyword\n`mut` after the keyword `let` when declaring the variable. For example:\n\n```\nfn main() {\n let mut x = 3;\n x = 5;\n}\n```\n"},"level":"error","spans":[{"file_name":"src/main.rs","byte_start":21,"byte_end":22,"line_start":3,"line_end":3,"column_start":9,"column_end":10,"is_primary":false,"text":[{"text":" let x = 1;","highlight_start":9,"highlight_end":10}],"label":"first assignment to `x`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":32,"byte_end":38,"line_start":4,"line_end":4,"column_start":5,"column_end":11,"is_primary":true,"text":[{"text":" x += 1;","highlight_start":5,"highlight_end":11}],"label":"cannot assign twice to immutable variable","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"make this binding mutable","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":21,"byte_end":22,"line_start":3,"line_end":3,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":" let x = 1;","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":"mut x","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0384]: cannot assign twice to immutable variable `x`\n --> src/main.rs:4:5\n |\n3 | let x = 1;\n | -\n | |\n | first assignment to `x`\n | help: make this binding mutable: `mut x`\n4 | x += 1;\n | ^^^^^^ cannot assign twice to immutable variable\n\n"}} | |
{"reason":"compiler-message","package_id":"beep 0.1.0 (path+file:///home/rob/proj/rust/beep)","target":{"kind":["bin"],"crate_types":["bin"],"name":"beep","src_path":"/home/rob/proj/rust/beep/src/main.rs","edition":"2018"},"message":{"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}} | |
{"reason":"compiler-message","package_id":"beep 0.1.0 (path+file:///home/rob/proj/rust/beep)","target":{"kind":["bin"],"crate_types":["bin"],"name":"beep","src_path":"/home/rob/proj/rust/beep/src/main.rs","edition":"2018"},"message":{"message":"For more information about this error, try `rustc --explain E0384`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0384`.\n"}} | |
error: Could not compile `beep`. | |
To learn more, run the command again with --verbose. | |
Compilation exited abnormally with code 101 at Wed Jan 2 13:07:48 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment