Skip to content

Commit def1705

Browse files
committed
Update to a compiletest-rs version that requires //@ for commands
1 parent 4d35b5e commit def1705

File tree

724 files changed

+945
-1009
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

724 files changed

+945
-1009
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ tempfile = { version = "3.2", optional = true }
2828
termize = "0.1"
2929

3030
[dev-dependencies]
31-
compiletest_rs = { version = "0.9", features = ["tmp"] }
31+
compiletest_rs = { version = "0.10", features = ["tmp"] }
3232
tester = "0.9"
3333
regex = "1.5"
3434
toml = "0.5"

book/src/development/adding_lints.md

Lines changed: 1 addition & 1 deletion

clippy_dev/src/update_lints.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ fn gen_deprecated_lints_test(lints: &[DeprecatedLint]) -> String {
741741
fn gen_renamed_lints_test(lints: &[RenamedLint]) -> String {
742742
let mut seen_lints = HashSet::new();
743743
let mut res: String = GENERATED_FILE_COMMENT.into();
744-
res.push_str("// run-rustfix\n\n");
744+
res.push_str("//@run-rustfix\n\n");
745745
for lint in lints {
746746
if seen_lints.insert(&lint.new_name) {
747747
writeln!(res, "#![allow({})]", lint.new_name).unwrap();

clippy_lints/src/methods/obfuscated_if_else.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// run-rustfix
2-
31
use super::OBFUSCATED_IF_ELSE;
42
use clippy_utils::{diagnostics::span_lint_and_sugg, source::snippet_with_applicability};
53
use rustc_errors::Applicability;

tests/compile-test.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ fn base_config(test_dir: &str) -> compiletest::Config {
126126
let mut config = compiletest::Config {
127127
edition: Some("2021".into()),
128128
mode: TestMode::Ui,
129+
strict_headers: true,
129130
..Default::default()
130131
};
131132

@@ -424,7 +425,7 @@ fn check_rustfix_coverage() {
424425
.binary_search_by_key(&filename, Path::new)
425426
.is_ok(),
426427
"`{rs_file}` runs `MachineApplicable` diagnostics but is missing a `run-rustfix` annotation. \
427-
Please either add `// run-rustfix` at the top of the file or add the file to \
428+
Please either add `//@run-rustfix` at the top of the file or add the file to \
428429
`RUSTFIX_COVERAGE_KNOWN_EXCEPTIONS` in `tests/compile-test.rs`.",
429430
);
430431
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: --crate-name=cargo_common_metadata
1+
//@compile-flags: --crate-name=cargo_common_metadata
22
#![warn(clippy::cargo_common_metadata)]
33

44
fn main() {}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: --crate-name=cargo_common_metadata
1+
//@compile-flags: --crate-name=cargo_common_metadata
22
#![warn(clippy::cargo_common_metadata)]
33

44
fn main() {}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: --crate-name=cargo_common_metadata
1+
//@compile-flags: --crate-name=cargo_common_metadata
22
#![warn(clippy::cargo_common_metadata)]
33

44
fn main() {}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: --crate-name=cargo_common_metadata
1+
//@compile-flags: --crate-name=cargo_common_metadata
22
#![warn(clippy::cargo_common_metadata)]
33

44
fn main() {}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: --crate-name=cargo_common_metadata
1+
//@compile-flags: --crate-name=cargo_common_metadata
22
#![warn(clippy::cargo_common_metadata)]
33

44
fn main() {}

0 commit comments

Comments
 (0)