Skip to content

Commit

Permalink
Rollup merge of rust-lang#92047 - Aaron1011:location-detail-backtrace…
Browse files Browse the repository at this point in the history
…, 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.
  • Loading branch information
matthiaskrgr authored Dec 18, 2021
2 parents c2f1a62 + 2699def commit e4bb88e
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/test/ui/panics/location-detail-panic-no-column.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// run-fail
// check-run-results
// compile-flags: -Zlocation-detail=line,file
// exec-env:RUST_BACKTRACE=0

fn main() {
panic!("column-redacted");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
thread 'main' panicked at 'column-redacted', $DIR/location-detail-panic-no-column.rs:6:0
thread 'main' panicked at 'column-redacted', $DIR/location-detail-panic-no-column.rs:7:0
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
1 change: 1 addition & 0 deletions src/test/ui/panics/location-detail-panic-no-file.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// run-fail
// check-run-results
// compile-flags: -Zlocation-detail=line,column
// exec-env:RUST_BACKTRACE=0

fn main() {
panic!("file-redacted");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
thread 'main' panicked at 'file-redacted', <redacted>:6:5
thread 'main' panicked at 'file-redacted', <redacted>:7:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
1 change: 1 addition & 0 deletions src/test/ui/panics/location-detail-panic-no-line.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// run-fail
// check-run-results
// compile-flags: -Zlocation-detail=file,column
// exec-env:RUST_BACKTRACE=0

fn main() {
panic!("line-redacted");
Expand Down
1 change: 1 addition & 0 deletions src/test/ui/panics/location-detail-unwrap-no-file.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// run-fail
// check-run-results
// compile-flags: -Zlocation-detail=line,column
// exec-env:RUST_BACKTRACE=0

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

0 comments on commit e4bb88e

Please sign in to comment.