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

mk: Move from `-D warnings` to `#![deny(warnings)]` #31120

Merged
merged 3 commits into from Jan 27, 2016

Conversation

Projects
None yet
5 participants
@alexcrichton
Copy link
Member

alexcrichton commented Jan 22, 2016

This commit removes the -D warnings flag being passed through the makefiles to
all crates to instead be a crate attribute. We want these attributes always
applied for all our standard builds, and this is more amenable to Cargo-based
builds as well.

Note that all deny(warnings) attributes are gated with a cfg(stage0)
attribute currently to match the same semantics we have today

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jan 22, 2016

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jan 22, 2016

One change I also noticed was that the rustc_mir crate did not previously have an #[unstable] tag, which means that this compiles in stable Rust:

extern crate rustc_mir;

fn main() {}

I added the #[unstable] tag here, but I would be quite surprised if that actually caused breakage. @brson do you think it's worth adding to relnotes?

@brson

This comment has been minimized.

Copy link
Contributor

brson commented Jan 22, 2016

@alexcrichton It may not be worth mentioning but I'll tag it and think about it later. Also nominating for beta, maybe just the rustc_mir crate fix.

Here's an issue to lint for this problem: #31122

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jan 22, 2016

Oh let me rearrange the commits for the new unstable attribute to be in its own commit to be easily cherry-picked in that case.

@alexcrichton alexcrichton force-pushed the alexcrichton:attribute-deny-warnings branch from 85ab967 to 3a107c5 Jan 22, 2016

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jan 22, 2016

rearranged

@brson

This comment has been minimized.

Copy link
Contributor

brson commented Jan 22, 2016

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 22, 2016

📌 Commit 3a107c5 has been approved by brson

bors added a commit that referenced this pull request Jan 23, 2016

Auto merge of #31120 - alexcrichton:attribute-deny-warnings, r=brson
This commit removes the `-D warnings` flag being passed through the makefiles to
all crates to instead be a crate attribute. We want these attributes always
applied for all our standard builds, and this is more amenable to Cargo-based
builds as well.

Note that all `deny(warnings)` attributes are gated with a `cfg(stage0)`
attribute currently to match the same semantics we have today
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 23, 2016

⌛️ Testing commit 3a107c5 with merge 234e3dd...

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 23, 2016

💔 Test failed - auto-mac-64-opt

@alexcrichton alexcrichton force-pushed the alexcrichton:attribute-deny-warnings branch from 3a107c5 to ae8f816 Jan 23, 2016

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jan 23, 2016

@bors: r=brson ae8f816

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 23, 2016

⌛️ Testing commit ae8f816 with merge 96b734f...

bors added a commit that referenced this pull request Jan 23, 2016

Auto merge of #31120 - alexcrichton:attribute-deny-warnings, r=brson
This commit removes the `-D warnings` flag being passed through the makefiles to
all crates to instead be a crate attribute. We want these attributes always
applied for all our standard builds, and this is more amenable to Cargo-based
builds as well.

Note that all `deny(warnings)` attributes are gated with a `cfg(stage0)`
attribute currently to match the same semantics we have today
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 23, 2016

💔 Test failed - auto-linux-64-x-android-t

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 23, 2016

☔️ The latest upstream changes (presumably #31148) made this pull request unmergeable. Please resolve the merge conflicts.

@alexcrichton alexcrichton force-pushed the alexcrichton:attribute-deny-warnings branch from ae8f816 to fc8d780 Jan 24, 2016

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jan 24, 2016

@bors: r=brson fc8d780

bors added a commit that referenced this pull request Jan 24, 2016

Auto merge of #31120 - alexcrichton:attribute-deny-warnings, r=brson
This commit removes the `-D warnings` flag being passed through the makefiles to
all crates to instead be a crate attribute. We want these attributes always
applied for all our standard builds, and this is more amenable to Cargo-based
builds as well.

Note that all `deny(warnings)` attributes are gated with a `cfg(stage0)`
attribute currently to match the same semantics we have today
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 24, 2016

⌛️ Testing commit fc8d780 with merge 5ead8cf...

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 24, 2016

💔 Test failed - auto-linux-64-x-android-t

alexcrichton added some commits Jan 21, 2016

mk: Move from `-D warnings` to `#![deny(warnings)]`
This commit removes the `-D warnings` flag being passed through the makefiles to
all crates to instead be a crate attribute. We want these attributes always
applied for all our standard builds, and this is more amenable to Cargo-based
builds as well.

Note that all `deny(warnings)` attributes are gated with a `cfg(stage0)`
attribute currently to match the same semantics we have today
rustc_mir: Mark the crate as unstable
Wouldn't want to be able to link to this on stable Rust!

@alexcrichton alexcrichton force-pushed the alexcrichton:attribute-deny-warnings branch from fc8d780 to cc4db8b Jan 25, 2016

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jan 25, 2016

@bors: r=brson cc4db8b

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jan 25, 2016

@bors: r=brson 790b862

@tamird

This comment has been minimized.

Copy link
Contributor

tamird commented Jan 25, 2016

travis failed btw

src/libstd/process.rs:849:5: 866:6 error: duplicate definition of value `test_inherit_env` [E0428]
src/libstd/process.rs:849     fn test_inherit_env() {
src/libstd/process.rs:850         use env;
src/libstd/process.rs:851 
src/libstd/process.rs:852         let mut result = env_cmd().output().unwrap();
src/libstd/process.rs:853         let output = String::from_utf8(result.stdout).unwrap();
src/libstd/process.rs:854 
                          ...
src/libstd/process.rs:849:5: 866:6 help: run `rustc --explain E0428` to see a detailed explanation
src/libstd/process.rs:829:5: 845:6 note: first definition of value `test_inherit_env` here
src/libstd/process.rs:829     fn test_inherit_env() {
src/libstd/process.rs:830         use env;
src/libstd/process.rs:831 
src/libstd/process.rs:832         let result = env_cmd().output().unwrap();
src/libstd/process.rs:833         let output = String::from_utf8(result.stdout).unwrap();
src/libstd/process.rs:834 
#[test]
#[cfg_attr(target_os = "android", ignore)]

This comment has been minimized.

@tamird

tamird Jan 25, 2016

Contributor

shouldn't this not be ignored on android?

@alexcrichton alexcrichton force-pushed the alexcrichton:attribute-deny-warnings branch from 790b862 to 9d95a22 Jan 26, 2016

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jan 26, 2016

@bors: r=brson 9d95a22

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 26, 2016

⌛️ Testing commit 9d95a22 with merge 2518a71...

bors added a commit that referenced this pull request Jan 26, 2016

Auto merge of #31120 - alexcrichton:attribute-deny-warnings, r=brson
This commit removes the `-D warnings` flag being passed through the makefiles to
all crates to instead be a crate attribute. We want these attributes always
applied for all our standard builds, and this is more amenable to Cargo-based
builds as well.

Note that all `deny(warnings)` attributes are gated with a `cfg(stage0)`
attribute currently to match the same semantics we have today
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 26, 2016

💔 Test failed - auto-win-msvc-64-opt

@alexcrichton alexcrichton force-pushed the alexcrichton:attribute-deny-warnings branch from 9d95a22 to cdc1c2c Jan 26, 2016

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jan 26, 2016

@bors: r=brson cdc1c2c

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 26, 2016

⌛️ Testing commit cdc1c2c with merge 669130e...

bors added a commit that referenced this pull request Jan 26, 2016

Auto merge of #31120 - alexcrichton:attribute-deny-warnings, r=brson
This commit removes the `-D warnings` flag being passed through the makefiles to
all crates to instead be a crate attribute. We want these attributes always
applied for all our standard builds, and this is more amenable to Cargo-based
builds as well.

Note that all `deny(warnings)` attributes are gated with a `cfg(stage0)`
attribute currently to match the same semantics we have today
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 26, 2016

💔 Test failed - auto-mac-64-nopt-t

Fix warnings during tests
The deny(warnings) attribute is now enabled for tests so we need to weed out
these warnings as well.

@alexcrichton alexcrichton force-pushed the alexcrichton:attribute-deny-warnings branch from cdc1c2c to cb343c3 Jan 26, 2016

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jan 26, 2016

@bors: r=brson cb343c3

bors added a commit that referenced this pull request Jan 26, 2016

Auto merge of #31120 - alexcrichton:attribute-deny-warnings, r=brson
This commit removes the `-D warnings` flag being passed through the makefiles to
all crates to instead be a crate attribute. We want these attributes always
applied for all our standard builds, and this is more amenable to Cargo-based
builds as well.

Note that all `deny(warnings)` attributes are gated with a `cfg(stage0)`
attribute currently to match the same semantics we have today
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 26, 2016

⌛️ Testing commit cb343c3 with merge 4b61585...

@bors bors merged commit cb343c3 into rust-lang:master Jan 27, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details

@alexcrichton alexcrichton deleted the alexcrichton:attribute-deny-warnings branch Jan 27, 2016

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jan 27, 2016

flagging as beta-accepted, but only the commit alexcrichton@4b3c355

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.