From 17a61b261061365e9708478ccf95a8103dbc1944 Mon Sep 17 00:00:00 2001 From: xFrednet Date: Mon, 1 Apr 2024 12:03:16 +0200 Subject: [PATCH 1/2] Ignore `rustc-ice-` files --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 503ae3c50903..181b71a658b9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# Generated by ui-test +rustc-ice-* + # Used by CI to be able to push: /.github/deploy_key out From 24d20b4eae2646e79a7aba6a691ef39127431882 Mon Sep 17 00:00:00 2001 From: xFrednet Date: Mon, 1 Apr 2024 17:05:55 +0200 Subject: [PATCH 2/2] Set `RUSTC_ICE=0` in uitests and `cargo dev lint` --- clippy_dev/src/lint.rs | 4 ++++ tests/compile-test.rs | 2 ++ 2 files changed, 6 insertions(+) diff --git a/clippy_dev/src/lint.rs b/clippy_dev/src/lint.rs index 906a97278109..f308f5dfdfd8 100644 --- a/clippy_dev/src/lint.rs +++ b/clippy_dev/src/lint.rs @@ -20,6 +20,8 @@ pub fn run<'a>(path: &str, args: impl Iterator) { .args(["--edition", "2021"]) .arg(path) .args(args) + // Prevent rustc from creating `rustc-ice-*` files the console output is enough. + .env("RUSTC_ICE", "0") .status(), ); } else { @@ -32,6 +34,8 @@ pub fn run<'a>(path: &str, args: impl Iterator) { let status = Command::new(cargo_clippy_path()) .arg("clippy") .args(args) + // Prevent rustc from creating `rustc-ice-*` files the console output is enough. + .env("RUSTC_ICE", "0") .current_dir(path) .status(); diff --git a/tests/compile-test.rs b/tests/compile-test.rs index a0c8bf9334c4..32a31f5e0823 100644 --- a/tests/compile-test.rs +++ b/tests/compile-test.rs @@ -146,6 +146,8 @@ fn base_config(test_dir: &str) -> (Config, Args) { ); config.program.args.extend(EXTERN_FLAGS.iter().map(OsString::from)); + // Prevent rustc from creating `rustc-ice-*` files the console output is enough. + config.program.envs.push(("RUSTC_ICE".into(), Some("0".into()))); if let Some(host_libs) = option_env!("HOST_LIBS") { let dep = format!("-Ldependency={}", Path::new(host_libs).join("deps").display());