std: move FULL_BACKTRACE_DEFAULT to sys::backtrace
This commit is contained in:
parent
aa73de400d
commit
854df94584
3 changed files with 7 additions and 7 deletions
|
|
@ -523,7 +523,7 @@ pub fn get_backtrace_style() -> Option<BacktraceStyle> {
|
|||
Some(x) if &x == "0" => BacktraceStyle::Off,
|
||||
Some(x) if &x == "full" => BacktraceStyle::Full,
|
||||
Some(_) => BacktraceStyle::Short,
|
||||
None if crate::sys::FULL_BACKTRACE_DEFAULT => BacktraceStyle::Full,
|
||||
None if crate::sys::backtrace::FULL_BACKTRACE_DEFAULT => BacktraceStyle::Full,
|
||||
None => BacktraceStyle::Off,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,12 @@ use crate::{env, fmt, io};
|
|||
/// Max number of frames to print.
|
||||
const MAX_NB_FRAMES: usize = 100;
|
||||
|
||||
pub(crate) const FULL_BACKTRACE_DEFAULT: bool = cfg_select! {
|
||||
// Fuchsia components default to full backtrace.
|
||||
target_os = "fuchsia" => true,
|
||||
_ => false,
|
||||
};
|
||||
|
||||
pub(crate) struct BacktraceLock<'a>(#[allow(dead_code)] MutexGuard<'a, ()>);
|
||||
|
||||
pub(crate) fn lock<'a>() -> BacktraceLock<'a> {
|
||||
|
|
|
|||
|
|
@ -86,9 +86,3 @@ cfg_select! {
|
|||
pub use self::unsupported::*;
|
||||
}
|
||||
}
|
||||
|
||||
pub const FULL_BACKTRACE_DEFAULT: bool = cfg_select! {
|
||||
// Fuchsia components default to full backtrace.
|
||||
target_os = "fuchsia" => true,
|
||||
_ => false,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue