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 test prints warnings and errors twice #1534

Closed
sbstp opened this issue Apr 18, 2015 · 1 comment
Closed

Cargo test prints warnings and errors twice #1534

sbstp opened this issue Apr 18, 2015 · 1 comment

Comments

@sbstp
Copy link

sbstp commented Apr 18, 2015

cargo test prints all of the errors/warnings twice.

simon@Simon-Desktop:~/Projects/celavy/celavy$ cargo test
src/dispatcher.rs:12:5: 12:9 warning: variant is never used: `Quit`, #[warn(dead_code)] on by default
src/dispatcher.rs:12     Quit,
                         ^~~~
src/dispatcher.rs:68:5: 68:18 warning: struct field is never used: `name`, #[warn(dead_code)] on by default
src/dispatcher.rs:68     name: &'a str,
                         ^~~~~~~~~~~~~
src/dispatcher.rs:12:5: 12:9 warning: variant is never used: `Quit`, #[warn(dead_code)] on by default
src/dispatcher.rs:12     Quit,
                         ^~~~
src/dispatcher.rs:68:5: 68:18 warning: struct field is never used: `name`, #[warn(dead_code)] on by default
src/dispatcher.rs:68     name: &'a str,

@alexcrichton
Copy link
Member

This is actually a duplicate of #851, and the underlying cause of this is that your library is being compiled normally and with --test. The normal compilation is happening because it's necessary to run doctests afterwards.

You can specify doctest = false for now and we'll eventually add more CLI flags to control which tests are run to only build one. For now though this is working as intended.

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

2 participants