diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-01-13 19:16:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-13 19:16:41 +0100 |
| commit | 96bb02f35c4f8bef4090185bdbb8f5bc4a898e44 (patch) | |
| tree | 37e51c7a4e0c41b3f9147f252aa90435a1b89835 /tests | |
| parent | 0b90256ada21c6a81b4c18f2c7a23151ab5fc232 (diff) | |
| parent | 4e2a3567bc14ad7b7e9d28f31fc1a468976ebc81 (diff) | |
| download | rust-96bb02f35c4f8bef4090185bdbb8f5bc4a898e44.tar.gz rust-96bb02f35c4f8bef4090185bdbb8f5bc4a898e44.zip | |
Rollup merge of #104645 - yukiomoto:log-backtrace-option, r=oli-obk
Add log-backtrace option to show backtraces along with logging according to #90698, I added a compiler option, `-Zlog-backtrace=filter`, where `filter` is a module name, to show backtraces for logging without rebuilding. resolve #90698
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/rustdoc-ui/z-help.stdout | 1 | ||||
| -rw-r--r-- | tests/ui/attributes/log-backtrace.rs | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/z-help.stdout b/tests/rustdoc-ui/z-help.stdout index 43f30f3d6e8..4bdecdc1b79 100644 --- a/tests/rustdoc-ui/z-help.stdout +++ b/tests/rustdoc-ui/z-help.stdout @@ -76,6 +76,7 @@ -Z llvm-plugins=val -- a list LLVM plugins to enable (space separated) -Z llvm-time-trace=val -- generate JSON tracing data file from LLVM data (default: no) -Z location-detail=val -- what location details should be tracked when using caller_location, either `none`, or a comma separated list of location details, for which valid options are `file`, `line`, and `column` (default: `file,line,column`) + -Z log-backtrace=val -- add a backtrace along with logging -Z ls=val -- list the symbols defined by a library crate (default: no) -Z macro-backtrace=val -- show macro backtraces (default: no) -Z maximal-hir-to-mir-coverage=val -- save as much information as possible about the correspondence between MIR and HIR as source scopes (default: no) diff --git a/tests/ui/attributes/log-backtrace.rs b/tests/ui/attributes/log-backtrace.rs new file mode 100644 index 00000000000..3979d2001fc --- /dev/null +++ b/tests/ui/attributes/log-backtrace.rs @@ -0,0 +1,9 @@ +// run-pass +// +// This test makes sure that log-backtrace option doesn't give a compilation error. +// +// dont-check-compiler-stdout +// dont-check-compiler-stderr +// rustc-env:RUSTC_LOG=info +// compile-flags: -Zlog-backtrace=rustc_metadata::creader +fn main() {} |
