Skip to content

Commit 0b143e3

Browse files
committed
Auto merge of rust-lang#8304 - camsteffen:test-tweaks, r=flip1995
Remove __CLIPPY_INTERNAL_TESTS env var changelog: none It doesn't have any effect AFAICT.
2 parents 16032c5 + 3afbae3 commit 0b143e3

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

clippy_dev/src/lint.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ pub fn run(filename: &str) {
77
.args(["-Z", "no-codegen"])
88
.args(["--edition", "2021"])
99
.arg(filename)
10-
.env("__CLIPPY_INTERNAL_TESTS", "true")
1110
.status()
1211
.expect("failed to run cargo")
1312
.code();

src/driver.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,11 +331,10 @@ pub fn main() {
331331
// - IF Clippy is run on the main crate, not on deps (`!cap_lints_allow`) THEN
332332
// - IF `--no-deps` is not set (`!no_deps`) OR
333333
// - IF `--no-deps` is set and Clippy is run on the specified primary package
334-
let clippy_tests_set = env::var("__CLIPPY_INTERNAL_TESTS").map_or(false, |val| val == "true");
335334
let cap_lints_allow = arg_value(&orig_args, "--cap-lints", |val| val == "allow").is_some();
336335
let in_primary_package = env::var("CARGO_PRIMARY_PACKAGE").is_ok();
337336

338-
let clippy_enabled = clippy_tests_set || (!cap_lints_allow && (!no_deps || in_primary_package));
337+
let clippy_enabled = !cap_lints_allow && (!no_deps || in_primary_package);
339338
if clippy_enabled {
340339
args.extend(clippy_args);
341340
}

tests/compile-test.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -328,15 +328,9 @@ fn run_ui_cargo(config: &mut compiletest::Config) {
328328
}
329329
}
330330

331-
fn prepare_env() {
332-
set_var("CLIPPY_DISABLE_DOCS_LINKS", "true");
333-
set_var("__CLIPPY_INTERNAL_TESTS", "true");
334-
//set_var("RUST_BACKTRACE", "0");
335-
}
336-
337331
#[test]
338332
fn compile_test() {
339-
prepare_env();
333+
set_var("CLIPPY_DISABLE_DOCS_LINKS", "true");
340334
let mut config = default_config();
341335
run_ui(&mut config);
342336
run_ui_test(&mut config);

0 commit comments

Comments
 (0)