Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit89b5784

Browse files
committed
std: movesys_common::backtrace tosys
1 parent6832ad3 commit89b5784

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

‎std/src/backtrace.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ use crate::fmt;
9595
usecrate::panic::UnwindSafe;
9696
usecrate::sync::atomic::{AtomicU8,Ordering::Relaxed};
9797
usecrate::sync::LazyLock;
98-
usecrate::sys_common::backtrace::{lock, output_filename, set_image_base};
98+
usecrate::sys::backtrace::{lock, output_filename, set_image_base};
9999

100100
/// A captured OS thread stack backtrace.
101101
///

‎std/src/error.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ impl<E> Report<E> {
429429
/// 1: rust_out::main::_doctest_main_src_error_rs_1158_0
430430
/// 2: rust_out::main
431431
/// 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
433433
/// 5: std::rt::lang_start::{{closure}}
434434
/// 6: std::panicking::try
435435
/// 7: std::rt::lang_start_internal

‎std/src/panicking.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ use crate::mem::{self, ManuallyDrop};
1919
usecrate::process;
2020
usecrate::sync::atomic::{AtomicBool,Ordering};
2121
usecrate::sync::{PoisonError,RwLock};
22+
usecrate::sys::backtrace;
2223
usecrate::sys::stdio::panic_output;
23-
usecrate::sys_common::backtrace;
2424
usecrate::thread;
2525

2626
#[cfg(not(test))]
@@ -655,7 +655,7 @@ pub fn begin_panic_handler(info: &core::panic::PanicInfo<'_>) -> ! {
655655

656656
let loc = info.location().unwrap();// The current implementation always returns Some
657657
let msg = info.message();
658-
crate::sys_common::backtrace::__rust_end_short_backtrace(move ||{
658+
crate::sys::backtrace::__rust_end_short_backtrace(move ||{
659659
ifletSome(s) = msg.as_str(){
660660
rust_panic_with_hook(
661661
&mutStaticStrPayload(s),
@@ -727,7 +727,7 @@ pub const fn begin_panic<M: Any + Send>(msg: M) -> ! {
727727
}
728728

729729
let loc =Location::caller();
730-
crate::sys_common::backtrace::__rust_end_short_backtrace(move ||{
730+
crate::sys::backtrace::__rust_end_short_backtrace(move ||{
731731
rust_panic_with_hook(
732732
&mutPayload{inner:Some(msg)},
733733
loc,

‎std/src/rt.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ fn lang_start<T: crate::process::Termination + 'static>(
156156
sigpipe:u8,
157157
) ->isize{
158158
letOk(v) =lang_start_internal(
159-
&move ||crate::sys_common::backtrace::__rust_begin_short_backtrace(main).report().to_i32(),
159+
&move ||crate::sys::backtrace::__rust_begin_short_backtrace(main).report().to_i32(),
160160
argc,
161161
argv,
162162
sigpipe,

‎std/src/sys_common/backtrace.rs‎renamed to ‎std/src/sys/backtrace.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
//! Common code for printing backtraces.
2+
13
usecrate::backtrace_rs::{self,BacktraceFmt,BytesOrWideString,PrintFmt};
24
usecrate::borrow::Cow;
3-
/// Common code for printing the backtrace in the same way across the different
4-
/// supported platforms.
55
usecrate::env;
66
usecrate::fmt;
77
usecrate::io;

‎std/src/sys/mod.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ mod pal;
55

66
mod personality;
77

8+
pubmod backtrace;
89
pubmod cmath;
910
pubmod os_str;
1011
pubmod path;

‎std/src/sys_common/mod.rs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#[cfg(test)]
2121
mod tests;
2222

23-
pubmod backtrace;
2423
pubmod fs;
2524
pubmod io;
2625
pubmod lazy_box;

‎std/src/thread/mod.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ impl Builder {
539539
let f = f.into_inner();
540540
set_current(their_thread);
541541
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)
543543
}));
544544
// SAFETY: `their_packet` as been built just above and moved by the
545545
// closure (it is an Arc<...>) and `my_packet` will be stored in the

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp