Skip to content

'cargo test' shouldn't build with '#[warn(dead_code)]' #983

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

Closed
dan-t opened this issue Nov 26, 2014 · 1 comment
Closed

'cargo test' shouldn't build with '#[warn(dead_code)]' #983

dan-t opened this issue Nov 26, 2014 · 1 comment

Comments

@dan-t
Copy link

dan-t commented Nov 26, 2014

You're just getting a lot of meaningless warnings, because a lot of code isn't
referenced by the tests.

I haven't tested it, but the same might apply for 'cargo bench'.

Greetings,
Daniel

@alexcrichton
Copy link
Member

Closing as a dupe of rust-lang/rust#12327, but for now you can add #![cfg_attr(test, allow(dead_code))] to your crates.

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