Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cargo prints compiler errors twice #3874

Closed
matklad opened this issue Mar 29, 2017 · 2 comments
Closed

Cargo prints compiler errors twice #3874

matklad opened this issue Mar 29, 2017 · 2 comments

Comments

@matklad
Copy link
Member

matklad commented Mar 29, 2017

cargo-0.17.0-nightly (f9e5481 2017-03-03)

λ cargo test --all                                                                                            ~/projects/fall
   Compiling fall-gen v0.1.0 (file:///home/matklad/projects/fall/fall_gen)
error: no method named `many_of_type` found for type `fall_tree::node::imp::NodeChildren<'_>` in the current scope
  --> fall_gen/src/lib.rs:48:21
   |
48 |         .children().many_of_type(TOKEN_DEF)
   |                     ^^^^^^^^^^^^

error: no method named `many_of_type` found for type `fall_tree::node::imp::NodeChildren<'_>` in the current scope
  --> fall_gen/src/lib.rs:48:21
   |
48 |         .children().many_of_type(TOKEN_DEF)
   |                     ^^^^^^^^^^^^

error: aborting due to previous error

Looks like it's --depinfo?

--verbose
   Compiling fall-gen v0.1.0 (file:///home/matklad/projects/fall/fall_gen)
     Running `rustc --crate-name fall_gen fall_gen/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=a5f4f827a7e1e0a5 -C extra-filename=-a5f4f827a7e1e0a5 --out-dir /home/matklad/projects/fall/target/debug/deps -L dependency=/home/matklad/projects/fall/target/debug/deps --extern file=/home/matklad/projects/fall/target/debug/deps/libfile-35f7e092fbc94f65.rlib --extern clap=/home/matklad/projects/fall/target/debug/deps/libclap-11113a9323543daa.rlib --extern fall_parse=/home/matklad/projects/fall/target/debug/deps/libfall_parse-aadd3fc804a743e6.rlib --extern fall_tree=/home/matklad/projects/fall/target/debug/deps/libfall_tree-0f146101e9341e1d.rlib --extern fall_watch=/home/matklad/projects/fall/target/debug/deps/libfall_watch-2c2b1293660b70b1.rlib -C target-cpu=native`
     Running `rustc --crate-name fall_gen fall_gen/src/lib.rs --emit=dep-info,link -C debuginfo=2 --test -C metadata=8f5d94722fa7faf7 -C extra-filename=-8f5d94722fa7faf7 --out-dir /home/matklad/projects/fall/target/debug/deps -L dependency=/home/matklad/projects/fall/target/debug/deps --extern file=/home/matklad/projects/fall/target/debug/deps/libfile-35f7e092fbc94f65.rlib --extern clap=/home/matklad/projects/fall/target/debug/deps/libclap-11113a9323543daa.rlib --extern difference=/home/matklad/projects/fall/target/debug/deps/libdifference-51300806a4ca13f2.rlib --extern fall_parse=/home/matklad/projects/fall/target/debug/deps/libfall_parse-aadd3fc804a743e6.rlib --extern tempdir=/home/matklad/projects/fall/target/debug/deps/libtempdir-0ee757a585f719dd.rlib --extern fall_tree=/home/matklad/projects/fall/target/debug/deps/libfall_tree-0f146101e9341e1d.rlib --extern fall_watch=/home/matklad/projects/fall/target/debug/deps/libfall_watch-2c2b1293660b70b1.rlib -C target-cpu=native`
error: no method named `many_of_type` found for type `fall_tree::node::imp::NodeChildren<'_>` in the current scope
  --> fall_gen/src/lib.rs:48:21
   |
48 |         .children().many_of_type(TOKEN_DEF)
   |                     ^^^^^^^^^^^^

error: no method named `many_of_type` found for type `fall_tree::node::imp::NodeChildren<'_>` in the current scope
  --> fall_gen/src/lib.rs:48:21
   |
48 |         .children().many_of_type(TOKEN_DEF)
   |                     ^^^^^^^^^^^^

error: aborting due to previous error

error: Could not compile `fall-gen`.

Caused by:
  process didn't exit successfully: `rustc --crate-name fall_gen fall_gen/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=a5f4f827a7e1e0a5 -C extra-filename=-a5f4f827a7e1e0a5 --out-dir /home/matklad/projects/fall/target/debug/deps -L dependency=/home/matklad/projects/fall/target/debug/deps --extern file=/home/matklad/projects/fall/target/debug/deps/libfile-35f7e092fbc94f65.rlib --extern clap=/home/matklad/projects/fall/target/debug/deps/libclap-11113a9323543daa.rlib --extern fall_parse=/home/matklad/projects/fall/target/debug/deps/libfall_parse-aadd3fc804a743e6.rlib --extern fall_tree=/home/matklad/projects/fall/target/debug/deps/libfall_tree-0f146101e9341e1d.rlib --extern fall_watch=/home/matklad/projects/fall/target/debug/deps/libfall_watch-2c2b1293660b70b1.rlib -C target-cpu=native` (exit code: 101)
Build failed, waiting for other jobs to finish...
error: aborting due to previous error

error: build failed
@alexcrichton
Copy link
Member

Is this #3531 perhaps?

@carols10cents
Copy link
Member

Yep, closing as a duplicate of #3531; the diff of the two invocations is:

  • the first has --crate-type lib and the second does not
  • the second has --test and the first does not

which is consistent with the currently intended behavior of compiling once for doc tests and once for regular tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants