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

Visible compiler "note" from dependency #1463

Closed
SimonSapin opened this issue Mar 27, 2015 · 2 comments
Closed

Visible compiler "note" from dependency #1463

SimonSapin opened this issue Mar 27, 2015 · 2 comments

Comments

@SimonSapin
Copy link
Contributor

Usually, warnings and other compiler output from building non-path dependencies is hidden by Cargo. With cargo 0.0.1-pre-nightly (9f265c8 2015-03-25) (built 2015-03-25) and rustc 1.0.0-nightly (27901849e 2015-03-25) (built 2015-03-26), when libc is a dependency, one line of output is not hidden:

rust-cssparser% cargo test -j1 
   Compiling text_writer v0.1.9
   Compiling libc v0.1.3
note: use an identifier not in quotes instead
   Compiling rustc-serialize v0.3.7
[…]
@SimonSapin
Copy link
Contributor Author

(It’s possible that the root cause is in rustc, maybe in std, but I’m filing this here because it superficially looks like a Cargo issue.)

@alexcrichton
Copy link
Member

Yes this is unfortunately a rustc "bug". What's actually happening here is that libc has extern crate "std" as std which the compiler is generating a warning for (deprecated syntax). This warning is accompanied with the note that you see. The compiler also, however, has logic to suppress all warnings on -Awarnings (which Cargo is passing), it just doesn't understand how to suppress the note as well.

You can see rust-lang/rust#23782 for a fix!

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