Skip to content

Commit fd25904

Browse files
authored
Rollup merge of #92047 - Aaron1011:location-detail-backtrace, r=Mark-Simulacrum
Set `RUST_BACKTRACE=0` when running location-detail tests This ensures that the output does not depend on environment variables set in the shell.
2 parents cc043aa + 2699def commit fd25904

7 files changed

+7
-3
lines changed

src/test/ui/panics/location-detail-panic-no-column.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// run-fail
22
// check-run-results
33
// compile-flags: -Zlocation-detail=line,file
4+
// exec-env:RUST_BACKTRACE=0
45

56
fn main() {
67
panic!("column-redacted");
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
thread 'main' panicked at 'column-redacted', $DIR/location-detail-panic-no-column.rs:6:0
1+
thread 'main' panicked at 'column-redacted', $DIR/location-detail-panic-no-column.rs:7:0
22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

src/test/ui/panics/location-detail-panic-no-file.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// run-fail
22
// check-run-results
33
// compile-flags: -Zlocation-detail=line,column
4+
// exec-env:RUST_BACKTRACE=0
45

56
fn main() {
67
panic!("file-redacted");
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
thread 'main' panicked at 'file-redacted', <redacted>:6:5
1+
thread 'main' panicked at 'file-redacted', <redacted>:7:5
22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

src/test/ui/panics/location-detail-panic-no-line.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// run-fail
22
// check-run-results
33
// compile-flags: -Zlocation-detail=file,column
4+
// exec-env:RUST_BACKTRACE=0
45

56
fn main() {
67
panic!("line-redacted");

src/test/ui/panics/location-detail-unwrap-no-file.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// run-fail
22
// check-run-results
33
// compile-flags: -Zlocation-detail=line,column
4+
// exec-env:RUST_BACKTRACE=0
45

56
fn main() {
67
let opt: Option<u32> = None;
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', <redacted>:7:9
1+
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', <redacted>:8:9
22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

0 commit comments

Comments
 (0)