Skip to content

Commit bfb22b2

Browse files
authored
Merge pull request #178 from Alexendoo/bless-1.73
Bless panic output change from Rust 1.73
2 parents 5898e04 + 531c47b commit bfb22b2

13 files changed

+49
-56
lines changed

tests/integration.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ fn main() -> Result<()> {
4545
"No such file or directory",
4646
);
4747
config.filter("RUSTC_BOOTSTRAP=\"1\" ", "");
48+
config.filter("RUSTC_ICE=\"0\" ", "");
4849
// The order of the `/deps` directory flag is flaky
4950
config.stdout_filter("/deps", "");
5051
config.path_filter(std::path::Path::new(path), "$DIR");

tests/integrations/basic-fail/Cargo.stderr

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ error: test failed, to rerun pass `--test ui_tests`
66

77
Caused by:
88
process didn't exit successfully: `$DIR/target/ui/$DIR/debug/deps/ui_tests-HASH` (exit status: 1)
9-
thread 'main' panicked at 'invalid mode/result combo: yolo: Err(tests failed
9+
thread 'main' panicked at tests/ui_tests_bless.rs:52:18:
10+
invalid mode/result combo: yolo: Err(tests failed
1011

1112
Location:
12-
$DIR/src/lib.rs:LL:CC)', tests/ui_tests_bless.rs:52:18
13+
$DIR/src/lib.rs:LL:CC)
1314
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
1415
error: test failed, to rerun pass `--test ui_tests_bless`
1516
Error: failed to parse rustc version info: invalid_foobarlaksdfalsdfj

tests/integrations/basic-fail/Cargo.stdout

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -234,28 +234,29 @@ command: "rustc" "--error-format=json" "--extern" "basic_fail=$DIR/$DIR/../../..
234234

235235
error: fail test got exit status: 101, but expected 1
236236

237-
error: `mismatched types` not found in diagnostics on line 10
238-
--> tests/actual_tests/rustc_ice.rs:11:17
239-
|
240-
11 | //~^ ERROR: mismatched types
241-
| ^^^^^^^^^^^^^^^^ expected because of this pattern
242-
|
237+
error: `mismatched types` not found in diagnostics on line 8
238+
--> tests/actual_tests/rustc_ice.rs:9:17
239+
|
240+
9 | //~^ ERROR: mismatched types
241+
| ^^^^^^^^^^^^^^^^ expected because of this pattern
242+
|
243243

244244
error: there were 1 unmatched diagnostics
245-
--> tests/actual_tests/rustc_ice.rs:10:5
246-
|
247-
10 | add("42", 3);
248-
| ^^^^^^^^^^^^ Ice: no errors reported for args
249-
|
245+
--> tests/actual_tests/rustc_ice.rs:8:5
246+
|
247+
8 | add("42", 3);
248+
| ^^^^^^^^^^^^ Ice: no errors reported for args
249+
|
250250

251251
full stderr:
252252
error: internal compiler error: no errors reported for args
253-
--> tests/actual_tests/rustc_ice.rs:10:5
254-
|
255-
10 | add("42", 3);
256-
| ^^^^^^^^^^^^
253+
--> tests/actual_tests/rustc_ice.rs:8:5
254+
|
255+
8 | add("42", 3);
256+
| ^^^^^^^^^^^^
257257

258-
thread 'rustc' panicked at 'aborting due to `-Z treat-err-as-bug=1`', compiler/rustc_errors/src/lib.rs
258+
thread 'rustc' panicked at compiler/rustc_errors/src/lib.rs:
259+
aborting due to `-Z treat-err-as-bug=1`
259260
stack backtrace:
260261

261262
error: the compiler unexpectedly panicked. this is a bug.
@@ -268,8 +269,7 @@ note: compiler flags: -Z treat-err-as-bug
268269

269270
query stack during panic:
270271
#0 [typeck] type-checking `main`
271-
#1 [used_trait_imports] finding used_trait_imports `main`
272-
#2 [analysis] running analysis passes on this crate
272+
#1 [analysis] running analysis passes on this crate
273273
end of query stack
274274

275275
full stdout:

tests/integrations/basic-fail/tests/actual_tests/rustc_ice.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
//@compile-flags: -Ztreat-err-as-bug
22
//@rustc-env: RUSTC_BOOTSTRAP=1
3-
//@normalize-stderr-test: " +[0-9]+: .*\n" -> ""
4-
//@normalize-stderr-test: " +at \.?/.*\n" -> ""
5-
//@normalize-stderr-test: " running on .*" -> ""
6-
//@normalize-stderr-test: "note: rustc 1\..*" -> ""
3+
//@rustc-env: RUSTC_ICE=0
4+
//@normalize-stderr-test: "(?s)(thread 'rustc' panicked).*end of query stack" -> "$1"
75
use basic_fail::add;
86

97
fn main() {
Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,7 @@
11
error: internal compiler error: no errors reported for args
2-
--> $DIR/rustc_ice.rs:10:5
3-
|
4-
10 | add("42", 3);
5-
| ^^^^^^^^^^^^
2+
--> $DIR/rustc_ice.rs:8:5
3+
|
4+
8 | add("42", 3);
5+
| ^^^^^^^^^^^^
66

7-
thread 'rustc' panicked at 'aborting due to `-Z treat-err-as-bug=1`', compiler/rustc_errors/src/lib.rs:1712:30
8-
stack backtrace:
9-
10-
error: the compiler unexpectedly panicked. this is a bug.
11-
12-
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
13-
14-
15-
16-
note: compiler flags: -Z treat-err-as-bug
17-
18-
query stack during panic:
19-
#0 [typeck] type-checking `main`
20-
#1 [used_trait_imports] finding used_trait_imports `main`
21-
#2 [analysis] running analysis passes on this crate
22-
end of query stack
7+
thread 'rustc' panicked
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
thread 'main' panicked at 'assertion failed: `(left == right)`
2-
left: `5`,
3-
right: `6`', $DIR/failing_executable.rs:4:5
1+
thread 'main' panicked at $DIR/failing_executable.rs:4:5:
2+
assertion `left == right` failed
3+
left: 5
4+
right: 6
45
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
thread 'main' panicked at 'explicit panic', $DIR/revisioned_executable_panic.rs:6:5
1+
thread 'main' panicked at $DIR/revisioned_executable_panic.rs:6:5:
2+
explicit panic
23
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
thread 'main' panicked at 'explicit panic', $DIR/revisioned_executable_panic.rs:6:5
1+
thread 'main' panicked at $DIR/revisioned_executable_panic.rs:6:5:
2+
explicit panic
23
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
thread 'main' panicked at 'explicit panic', $DIR/run_panic.rs:4:5
1+
thread 'main' panicked at $DIR/run_panic.rs:4:5:
2+
explicit panic
23
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
thread 'main' panicked at 'done', src/main.rs:12:5
1+
thread 'main' panicked at src/main.rs:12:5:
2+
done
23
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

0 commit comments

Comments
 (0)