std: move sys_common::backtrace to sys · model-checking/verify-rust-std@89b5784 (original) (raw)
8 files changed
lines changed
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -95,7 +95,7 @@ use crate::fmt; | ||
| 95 | 95 | use crate::panic::UnwindSafe; |
| 96 | 96 | use crate::sync::atomic::{AtomicU8, Ordering::Relaxed}; |
| 97 | 97 | use crate::sync::LazyLock; |
| 98 | -use crate::sys_common::backtrace::{lock, output_filename, set_image_base}; | |
| 98 | +use crate::sys::backtrace::{lock, output_filename, set_image_base}; | |
| 99 | 99 | |
| 100 | 100 | /// A captured OS thread stack backtrace. |
| 101 | 101 | /// |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -429,7 +429,7 @@ impl Report { | ||
| 429 | 429 | /// 1: rust_out::main::_doctest_main_src_error_rs_1158_0 |
| 430 | 430 | /// 2: rust_out::main |
| 431 | 431 | /// 3: core::ops::function::FnOnce::call_once |
| 432 | - /// 4: std::sys_common::backtrace::__rust_begin_short_backtrace | |
| 432 | + /// 4: std::sys::backtrace::__rust_begin_short_backtrace | |
| 433 | 433 | /// 5: std::rt::lang_start::{{closure}} |
| 434 | 434 | /// 6: std::panicking::try |
| 435 | 435 | /// 7: std::rt::lang_start_internal |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -19,8 +19,8 @@ use crate::mem::{self, ManuallyDrop}; | ||
| 19 | 19 | use crate::process; |
| 20 | 20 | use crate::sync::atomic::{AtomicBool, Ordering}; |
| 21 | 21 | use crate::sync::{PoisonError, RwLock}; |
| 22 | +use crate::sys::backtrace; | |
| 22 | 23 | use crate::sys::stdio::panic_output; |
| 23 | -use crate::sys_common::backtrace; | |
| 24 | 24 | use crate::thread; |
| 25 | 25 | |
| 26 | 26 | #[cfg(not(test))] |
| @@ -655,7 +655,7 @@ pub fn begin_panic_handler(info: &core::panic::PanicInfo<'_>) -> ! { | ||
| 655 | 655 | |
| 656 | 656 | let loc = info.location().unwrap(); // The current implementation always returns Some |
| 657 | 657 | let msg = info.message(); |
| 658 | -crate::sys_common::backtrace::__rust_end_short_backtrace(move | | |
| 658 | +crate::sys::backtrace::__rust_end_short_backtrace(move | | |
| 659 | 659 | if let Some(s) = msg.as_str() { |
| 660 | 660 | rust_panic_with_hook( |
| 661 | 661 | &mut StaticStrPayload(s), |
| @@ -727,7 +727,7 @@ pub const fn begin_panic<M: Any + Send>(msg: M) -> ! { | ||
| 727 | 727 | } |
| 728 | 728 | |
| 729 | 729 | let loc = Location::caller(); |
| 730 | -crate::sys_common::backtrace::__rust_end_short_backtrace(move | | |
| 730 | +crate::sys::backtrace::__rust_end_short_backtrace(move | | |
| 731 | 731 | rust_panic_with_hook( |
| 732 | 732 | &mut Payload { inner: Some(msg) }, |
| 733 | 733 | loc, |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -156,7 +156,7 @@ fn lang_start<T: crate::process::Termination + 'static>( | ||
| 156 | 156 | sigpipe: u8, |
| 157 | 157 | ) -> isize { |
| 158 | 158 | let Ok(v) = lang_start_internal( |
| 159 | -&move | | |
| 159 | +&move | | |
| 160 | 160 | argc, |
| 161 | 161 | argv, |
| 162 | 162 | sigpipe, |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| 1 | +//! Common code for printing backtraces. | |
| 2 | + | |
| 1 | 3 | use crate::backtrace_rs::{self, BacktraceFmt, BytesOrWideString, PrintFmt}; |
| 2 | 4 | use crate::borrow::Cow; |
| 3 | -/// Common code for printing the backtrace in the same way across the different | |
| 4 | -/// supported platforms. | |
| 5 | 5 | use crate::env; |
| 6 | 6 | use crate::fmt; |
| 7 | 7 | use crate::io; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -5,6 +5,7 @@ mod pal; | ||
| 5 | 5 | |
| 6 | 6 | mod personality; |
| 7 | 7 | |
| 8 | +pub mod backtrace; | |
| 8 | 9 | pub mod cmath; |
| 9 | 10 | pub mod os_str; |
| 10 | 11 | pub mod path; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -20,7 +20,6 @@ | ||
| 20 | 20 | #[cfg(test)] |
| 21 | 21 | mod tests; |
| 22 | 22 | |
| 23 | -pub mod backtrace; | |
| 24 | 23 | pub mod fs; |
| 25 | 24 | pub mod io; |
| 26 | 25 | pub mod lazy_box; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -539,7 +539,7 @@ impl Builder { | ||
| 539 | 539 | let f = f.into_inner(); |
| 540 | 540 | set_current(their_thread); |
| 541 | 541 | let try_result = panic::catch_unwind(panic::AssertUnwindSafe(| |
| 542 | -crate::sys_common::backtrace::__rust_begin_short_backtrace(f) | |
| 542 | +crate::sys::backtrace::__rust_begin_short_backtrace(f) | |
| 543 | 543 | })); |
| 544 | 544 | // SAFETY: `their_packet` as been built just above and moved by the |
| 545 | 545 | // closure (it is an Arc<...>) and `my_packet` will be stored in the |