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

Test harness inserts unstable warnings #20823

Closed
seanmonstar opened this issue Jan 9, 2015 · 3 comments · Fixed by #20828
Closed

Test harness inserts unstable warnings #20823

seanmonstar opened this issue Jan 9, 2015 · 3 comments · Fixed by #20828

Comments

@seanmonstar
Copy link
Contributor

With a file like:

pub struct Foo;
impl Copy for Foo {}

And then running rustc --test test.rs, these warnings are inserted:

sean@grunt:~/code$ rustc --test test.rs
<command line option> warning: use of unstable item: will be replaced by slice syntax, #[warn(unstable)] on by default
test.rs:1 pub struct Foo;
          ^
<command line option> warning: use of unstable item, #[warn(unstable)] on by default
test.rs:1 pub struct Foo;
          ^
<command line option> warning: use of unstable item, #[warn(unstable)] on by default
test.rs:1 pub struct Foo;
          ^

cc @alexcrichton @aturon

@alexcrichton
Copy link
Member

I believe @brson was working on this.

@alexcrichton
Copy link
Member

Nominating though, when we deny warnings in beta I've gotta be able to test my code still!

@seanmonstar
Copy link
Contributor Author

I've been using #[cfg_attr(test, deny(warnings))], and this blocks me from testing. For now, I have to comment out that line...

alexcrichton added a commit to alexcrichton/rust that referenced this issue Jan 9, 2015
This will temporarily prevent warnings generated from expanding to code that the
test harness itself uses. This solution will require tweaking around the beta
cycle, but it will prevent spurious warnings for now.

Closes rust-lang#20823
bors added a commit that referenced this issue Jan 10, 2015
This will temporarily prevent warnings generated from expanding to code that the
test harness itself uses. This solution will require tweaking around the beta
cycle, but it will prevent spurious warnings for now.

Closes #20823
daramos referenced this issue in daramos/rust-memcmp Jan 10, 2015
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

Successfully merging a pull request may close this issue.

2 participants