Skip to content

Commit b931a0f

Browse files
authored
Auto merge of #3083 - jhbabon:fix-warning-in-feature-tests, r=alexcrichton
FIX: Properly close dep_feature_in_cmd_line test. It was including the test `all_features_flag_enables_all_features` inside its function body and it was causing this warning when executing `cargo test`: ``` Compiling cargo v0.13.0 (file:///home/jhbabon/Code/cargo) tests/features.rs:965:1: 1006:2 warning: function is never used: `all_features_flag_enables_all_features`, #[warn(dead_code)] on by default tests/features.rs:965 fn all_features_flag_enables_all_features() { ^ tests/features.rs:964:1: 964:8 warning: unused attribute, #[warn(unused_attributes)] on by default tests/features.rs:964 #[test] ^~~~~~~ Running target/debug/features-e37991fdf417989c ```
2 parents 398de25 + 1f88ad5 commit b931a0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/features.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -960,6 +960,7 @@ fn dep_feature_in_cmd_line() {
960960
execs().with_status(101).with_stderr("\
961961
[ERROR] feature names may not contain slashes: `bar/some-feat`
962962
"));
963+
}
963964

964965
#[test]
965966
fn all_features_flag_enables_all_features() {
@@ -1004,4 +1005,3 @@ fn all_features_flag_enables_all_features() {
10041005
assert_that(p.cargo_process("build").arg("--all-features"),
10051006
execs().with_status(0));
10061007
}
1007-
}

0 commit comments

Comments
 (0)