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

Attempt to implement platform features #1197 #6286

Closed
wants to merge 14 commits into from
Prev Previous commit
Next Next commit
cfg_features::dont_include_default works on Unix
  • Loading branch information
snuk182 committed Nov 9, 2018
commit 9ae818b36c52542edda8f685bd450be81eb89aed
26 changes: 14 additions & 12 deletions tests/testsuite/cfg_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,21 +127,23 @@ error[E0425]: cannot find value `BB` in this scope",

#[test]
fn dont_include_default() {
let other_family = if cfg!(unix) { "windows" } else { "unix" };
let p = project()
.file(
"Cargo.toml",
r#"
[package]
name = "a"
version = "0.0.1"
authors = []

[target.'cfg(unix)'.features]
b = []

[features]
default = ["b"]
"#,
&format!(r#"
[package]
name = "a"
version = "0.0.1"
authors = []

[target.'cfg({})'.features]
b = []

[features]
default = ["b"]
"#,
other_family),
).file("src/lib.rs", r#"
#[cfg(feature = "b")]
pub const BB: usize = 0;
Expand Down