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.
This commit is contained in:
Matthias Krüger 2021-12-18 14:49:44 +01:00 committed by GitHub
commit fd259040d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 7 additions and 3 deletions

View File

@ -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");

View File

@ -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

View File

@ -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");

View File

@ -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

View File

@ -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");

View File

@ -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;

View File

@ -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