Closed

Description
When there are compilation errors, cargo hangs for 20 more seconds after showing them:
$ time cargo run -v
Compiling phrases v0.0.1 (file:///home/zazdxscf/build/1nonpkgs/rustLearnage/rust_book/phrases)
Running `rustc src/main.rs --crate-name phrases --crate-type bin -g --out-dir /home/zazdxscf/build/1nonpkgs/rustLearnage/rust_book/phrases/target/debug --emit=dep-info,link -L dependency=/home/zazdxscf/build/1nonpkgs/rustLearnage/rust_book/phrases/target/debug -L dependency=/home/zazdxscf/build/1nonpkgs/rustLearnage/rust_book/phrases/target/debug/deps --extern phrases=/home/zazdxscf/build/1nonpkgs/rustLearnage/rust_book/phrases/target/debug/libphrases.rlib`
src/main.rs:8:5: 8:12 error: expected one of `.`, `;`, `}`, or an operator, found `println`
src/main.rs:8 println!("Hello in English: {}", greetings::hello());
^~~~~~~
Could not compile `phrases`.
Caused by:
Process didn't exit successfully: `rustc src/main.rs --crate-name phrases --crate-type bin -g --out-dir /home/zazdxscf/build/1nonpkgs/rustLearnage/rust_book/phrases/target/debug --emit=dep-info,link -L dependency=/home/zazdxscf/build/1nonpkgs/rustLearnage/rust_book/phrases/target/debug -L dependency=/home/zazdxscf/build/1nonpkgs/rustLearnage/rust_book/phrases/target/debug/deps --extern phrases=/home/zazdxscf/build/1nonpkgs/rustLearnage/rust_book/phrases/target/debug/libphrases.rlib` (exit code: 101)
real 0m23.901s
user 0m23.303s
sys 0m0.290s
It hangs right on the line before displaying Could not compile phrases.
vs no errors:
$ time cargo run -v
Compiling phrases v0.0.1 (file:///home/zazdxscf/build/1nonpkgs/rustLearnage/rust_book/phrases)
Running `rustc src/main.rs --crate-name phrases --crate-type bin -g --out-dir /home/zazdxscf/build/1nonpkgs/rustLearnage/rust_book/phrases/target/debug --emit=dep-info,link -L dependency=/home/zazdxscf/build/1nonpkgs/rustLearnage/rust_book/phrases/target/debug -L dependency=/home/zazdxscf/build/1nonpkgs/rustLearnage/rust_book/phrases/target/debug/deps --extern phrases=/home/zazdxscf/build/1nonpkgs/rustLearnage/rust_book/phrases/target/debug/libphrases.rlib`
Running `target/debug/phrases`
Hello in English: Hello!
Goodbye in English: Goodbye.
Hello in Japanese: こんにちは
Goodbye in Japanese(日本語): さようなら
real 0m1.729s
user 0m1.200s
sys 0m0.333s
The tested project is here: https://github.com/zazdxscf/rustLearnage/tree/cd3ade8eae6f6cde99e7e750490b2672a1247b54/rust_book/phrases
But works on any, even simpler main.rs
ones.
Metadata
Metadata
Assignees
Labels
No labels