forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#99620 - hudson-ayers:fix-location-detail, r…
…=davidtwco `-Z location-detail`: provide option to disable all location details As reported [here](rust-lang#89920 (comment)), when I first implemented the `-Z location-detail` flag there was a bug, where passing an empty list was not correctly supported, and instead rejected by the compiler. This PR fixes that such that passing an empty list results in no location details being tracked, as originally specified in rust-lang/rfcs#2091 . This PR also adds a test case to verify that this option continues to work as intended.
- Loading branch information
Showing
5 changed files
with
21 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// run-fail | ||
// check-run-results | ||
// compile-flags: -Zlocation-detail=none | ||
// exec-env:RUST_BACKTRACE=0 | ||
|
||
fn main() { | ||
panic!("no location info"); | ||
} |
2 changes: 2 additions & 0 deletions
2
src/test/ui/panics/location-detail-panic-no-location-info.run.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
thread 'main' panicked at 'no location info', <redacted>:0:0 | ||
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace |