未验证 提交 fd259040 编写于 作者: M Matthias Krüger 提交者: GitHub

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.
// run-fail
// check-run-results
// compile-flags: -Zlocation-detail=line,file
// exec-env:RUST_BACKTRACE=0
fn main() {
panic!("column-redacted");
......
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
// run-fail
// check-run-results
// compile-flags: -Zlocation-detail=line,column
// exec-env:RUST_BACKTRACE=0
fn main() {
panic!("file-redacted");
......
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
// run-fail
// check-run-results
// compile-flags: -Zlocation-detail=file,column
// exec-env:RUST_BACKTRACE=0
fn main() {
panic!("line-redacted");
......
// run-fail
// check-run-results
// compile-flags: -Zlocation-detail=line,column
// exec-env:RUST_BACKTRACE=0
fn main() {
let opt: Option<u32> = None;
......
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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册