Rollup merge of #74490 - yaahc:disabled-bt, r=dtolnay
add a Backtrace::disabled function Based upon @dtolnay's suggestion here: https://github.com/dtolnay/anyhow/pull/97#issuecomment-647172942
This commit is contained in:
commit
f98c77c8b6
1 changed files with 6 additions and 0 deletions
|
|
@ -291,6 +291,12 @@ impl Backtrace {
|
|||
Backtrace::create(Backtrace::force_capture as usize)
|
||||
}
|
||||
|
||||
/// Forcibly captures a disabled backtrace, regardless of environment
|
||||
/// variable configuration.
|
||||
pub const fn disabled() -> Backtrace {
|
||||
Backtrace { inner: Inner::Disabled }
|
||||
}
|
||||
|
||||
// Capture a backtrace which start just before the function addressed by
|
||||
// `ip`
|
||||
fn create(ip: usize) -> Backtrace {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue