Skip to content

Commit 5dfb697

Browse files
committed
Use exec_env to set backtrace level and normalize output
1 parent 04133ea commit 5dfb697

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

tests/ui/custom_ice_message.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// exec-env:RUST_BACKTRACE=0
2+
// normalize-stderr-test: "Clippy version: .*" -> "Clippy version: foo"
3+
// normalize-stderr-test: "internal_lints.rs.*" -> "internal_lints.rs:1:1"
4+
15
#![deny(clippy::internal)]
26

37
fn should_trigger_an_ice_in_clippy() {}

tests/ui/custom_ice_message.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
thread 'rustc' panicked at 'Testing the ICE message', clippy_lints/src/utils/internal_lints.rs:333:13
1+
thread 'rustc' panicked at 'Testing the ICE message', clippy_lints/src/utils/internal_lints.rs:1:1
22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
33

44
error: internal compiler error: unexpected panic
@@ -7,5 +7,5 @@ note: the compiler unexpectedly panicked. this is a bug.
77

88
note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new
99

10-
note: Clippy version: clippy 0.0.212 (68ff8b19 2019-09-26)
10+
note: Clippy version: foo
1111

0 commit comments

Comments
 (0)