@@ -9,7 +9,7 @@ use crate::io::prelude::*;
99use crate :: path:: { self , Path , PathBuf } ;
1010use crate :: sys:: mutex:: Mutex ;
1111
12- use backtrace :: { BacktraceFmt , BytesOrWideString , PrintFmt } ;
12+ use backtrace_rs :: { BacktraceFmt , BytesOrWideString , PrintFmt } ;
1313
1414/// Max number of frames to print.
1515const MAX_NB_FRAMES : usize = 100 ;
@@ -33,7 +33,7 @@ pub fn lock() -> impl Drop {
3333}
3434
3535/// Prints the current backtrace.
36- #[ cfg( feature = "backtrace_support " ) ]
36+ #[ cfg( feature = "backtrace " ) ]
3737pub fn print ( w : & mut dyn Write , format : PrintFmt ) -> io:: Result < ( ) > {
3838 // There are issues currently linking libbacktrace into tests, and in
3939 // 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::
7474 bt_fmt. add_context ( ) ?;
7575 let mut idx = 0 ;
7676 let mut res = Ok ( ( ) ) ;
77- backtrace :: trace_unsynchronized ( |frame| {
77+ backtrace_rs :: trace_unsynchronized ( |frame| {
7878 if print_fmt == PrintFmt :: Short && idx > MAX_NB_FRAMES {
7979 return false ;
8080 }
8181
8282 let mut hit = false ;
8383 let mut stop = false ;
84- backtrace :: resolve_frame_unsynchronized ( frame, |symbol| {
84+ backtrace_rs :: resolve_frame_unsynchronized ( frame, |symbol| {
8585 hit = true ;
8686 if print_fmt == PrintFmt :: Short {
8787 if let Some ( sym) = symbol. name ( ) . and_then ( |s| s. as_str ( ) ) {
@@ -129,7 +129,7 @@ where
129129
130130// For now logging is turned off by default, and this function checks to see
131131// whether the magical environment variable is present to see if it's turned on.
132- #[ cfg( feature = "backtrace_support " ) ]
132+ #[ cfg( feature = "backtrace " ) ]
133133pub fn log_enabled ( ) -> Option < PrintFmt > {
134134 use crate :: sync:: atomic:: { self , Ordering } ;
135135
0 commit comments