@@ -9,7 +9,7 @@ use crate::io::prelude::*;
9
9
use crate :: path:: { self , Path , PathBuf } ;
10
10
use crate :: sys:: mutex:: Mutex ;
11
11
12
- use backtrace :: { BacktraceFmt , BytesOrWideString , PrintFmt } ;
12
+ use backtrace_rs :: { BacktraceFmt , BytesOrWideString , PrintFmt } ;
13
13
14
14
/// Max number of frames to print.
15
15
const MAX_NB_FRAMES : usize = 100 ;
@@ -33,7 +33,7 @@ pub fn lock() -> impl Drop {
33
33
}
34
34
35
35
/// Prints the current backtrace.
36
- #[ cfg( feature = "backtrace_support " ) ]
36
+ #[ cfg( feature = "backtrace " ) ]
37
37
pub fn print ( w : & mut dyn Write , format : PrintFmt ) -> io:: Result < ( ) > {
38
38
// There are issues currently linking libbacktrace into tests, and in
39
39
// general during libstd's own unit tests we're not testing this path. In
@@ -74,14 +74,14 @@ unsafe fn _print_fmt(fmt: &mut fmt::Formatter<'_>, print_fmt: PrintFmt) -> fmt::
74
74
bt_fmt. add_context ( ) ?;
75
75
let mut idx = 0 ;
76
76
let mut res = Ok ( ( ) ) ;
77
- backtrace :: trace_unsynchronized ( |frame| {
77
+ backtrace_rs :: trace_unsynchronized ( |frame| {
78
78
if print_fmt == PrintFmt :: Short && idx > MAX_NB_FRAMES {
79
79
return false ;
80
80
}
81
81
82
82
let mut hit = false ;
83
83
let mut stop = false ;
84
- backtrace :: resolve_frame_unsynchronized ( frame, |symbol| {
84
+ backtrace_rs :: resolve_frame_unsynchronized ( frame, |symbol| {
85
85
hit = true ;
86
86
if print_fmt == PrintFmt :: Short {
87
87
if let Some ( sym) = symbol. name ( ) . and_then ( |s| s. as_str ( ) ) {
@@ -129,7 +129,7 @@ where
129
129
130
130
// For now logging is turned off by default, and this function checks to see
131
131
// whether the magical environment variable is present to see if it's turned on.
132
- #[ cfg( feature = "backtrace_support " ) ]
132
+ #[ cfg( feature = "backtrace " ) ]
133
133
pub fn log_enabled ( ) -> Option < PrintFmt > {
134
134
use crate :: sync:: atomic:: { self , Ordering } ;
135
135
0 commit comments