Skip to content

Commit 41e814a

Browse files
committed
Auto merge of rust-lang#12605 - xFrednet:00000-ignore-ice, r=y21
Ignore `rustc-ice-` files When ui-test detects a crash, it writes it into a `rustc-ice-*` file. I find it a bit annoying that git always want's to add them. So this just adds these files to our `.gitignore` :D --- changelog: none
2 parents c2681f2 + 24d20b4 commit 41e814a

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Generated by ui-test
2+
rustc-ice-*
3+
14
# Used by CI to be able to push:
25
/.github/deploy_key
36
out

clippy_dev/src/lint.rs

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ pub fn run<'a>(path: &str, args: impl Iterator<Item = &'a String>) {
2020
.args(["--edition", "2021"])
2121
.arg(path)
2222
.args(args)
23+
// Prevent rustc from creating `rustc-ice-*` files the console output is enough.
24+
.env("RUSTC_ICE", "0")
2325
.status(),
2426
);
2527
} else {
@@ -32,6 +34,8 @@ pub fn run<'a>(path: &str, args: impl Iterator<Item = &'a String>) {
3234
let status = Command::new(cargo_clippy_path())
3335
.arg("clippy")
3436
.args(args)
37+
// Prevent rustc from creating `rustc-ice-*` files the console output is enough.
38+
.env("RUSTC_ICE", "0")
3539
.current_dir(path)
3640
.status();
3741

tests/compile-test.rs

+2
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ fn base_config(test_dir: &str) -> (Config, Args) {
146146
);
147147

148148
config.program.args.extend(EXTERN_FLAGS.iter().map(OsString::from));
149+
// Prevent rustc from creating `rustc-ice-*` files the console output is enough.
150+
config.program.envs.push(("RUSTC_ICE".into(), Some("0".into())));
149151

150152
if let Some(host_libs) = option_env!("HOST_LIBS") {
151153
let dep = format!("-Ldependency={}", Path::new(host_libs).join("deps").display());

0 commit comments

Comments
 (0)