Skip to content

Commit 9907096

Browse files
committed
Back out enabling the warning in std
1 parent 8feae12 commit 9907096

7 files changed

Lines changed: 0 additions & 13 deletions

File tree

library/std/src/alloc.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,6 @@ fn default_alloc_error_hook(layout: Layout) {
420420
#[doc(hidden)]
421421
#[alloc_error_handler]
422422
#[unstable(feature = "alloc_internals", issue = "none")]
423-
#[allow(missing_panic_entrypoint)]
424423
pub fn rust_oom(layout: Layout) -> ! {
425424
crate::sys::backtrace::__rust_end_short_backtrace(|| {
426425
let hook = HOOK.load(Ordering::Acquire);

library/std/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,6 @@
249249
#![deny(unsafe_op_in_unsafe_fn)]
250250
#![allow(rustdoc::redundant_explicit_links)]
251251
#![warn(rustdoc::unescaped_backticks)]
252-
#![warn(missing_panic_entrypoint)]
253252
// Ensure that std can be linked against panic_abort despite compiled with `-C panic=unwind`
254253
#![deny(ffi_unwind_calls)]
255254
// std may use features in a platform-specific way

library/std/src/panic.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,6 @@ pub fn catch_unwind<F: FnOnce() -> R + UnwindSafe, R>(f: F) -> Result<R> {
387387
/// }
388388
/// ```
389389
#[stable(feature = "resume_unwind", since = "1.9.0")]
390-
#[allow(missing_panic_entrypoint)]
391390
pub fn resume_unwind(payload: Box<dyn Any + Send>) -> ! {
392391
panicking::resume_unwind(payload)
393392
}

library/std/src/panicking.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ unsafe extern "Rust" {
7171
/// with our panic count.
7272
#[cfg(not(test))]
7373
#[rustc_std_internal_symbol]
74-
#[allow(missing_panic_entrypoint)]
7574
extern "C" fn __rust_drop_panic() -> ! {
7675
rtabort!("Rust panics must be rethrown");
7776
}
@@ -80,7 +79,6 @@ extern "C" fn __rust_drop_panic() -> ! {
8079
/// object which does not correspond to a Rust panic.
8180
#[cfg(not(test))]
8281
#[rustc_std_internal_symbol]
83-
#[allow(missing_panic_entrypoint)]
8482
extern "C" fn __rust_foreign_exception() -> ! {
8583
rtabort!("Rust cannot catch foreign exceptions");
8684
}
@@ -621,7 +619,6 @@ pub fn panicking() -> bool {
621619
/// Entry point of panics from the core crate (`panic_impl` lang item).
622620
#[cfg(not(any(test, doctest)))]
623621
#[panic_handler]
624-
#[allow(missing_panic_entrypoint)]
625622
pub fn panic_handler(info: &core::panic::PanicInfo<'_>) -> ! {
626623
struct FormatStringPayload<'a> {
627624
inner: &'a core::panic::PanicMessage<'a>,
@@ -784,7 +781,6 @@ fn payload_as_str(payload: &dyn Any) -> &str {
784781
/// panics, panic hooks, and finally dispatching to the panic runtime to either
785782
/// abort or unwind.
786783
#[optimize(size)]
787-
#[allow(missing_panic_entrypoint)]
788784
fn panic_with_hook(
789785
payload: &mut dyn PanicPayload,
790786
location: &Location<'_>,
@@ -854,7 +850,6 @@ fn panic_with_hook(
854850
/// This is the entry point for `resume_unwind`.
855851
/// It just forwards the payload to the panic runtime.
856852
#[cfg_attr(panic = "immediate-abort", inline)]
857-
#[allow(missing_panic_entrypoint)]
858853
pub fn resume_unwind(payload: Box<dyn Any + Send>) -> ! {
859854
panic_count::increase(false);
860855

library/std/src/process.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2160,7 +2160,6 @@ impl ExitCode {
21602160
/// }
21612161
/// ```
21622162
#[unstable(feature = "exitcode_exit_method", issue = "97100")]
2163-
#[allow(missing_panic_entrypoint)]
21642163
pub fn exit_process(self) -> ! {
21652164
exit(self.to_i32())
21662165
}
@@ -2463,7 +2462,6 @@ impl Child {
24632462
/// [C-exit]: https://en.cppreference.com/w/c/program/exit
24642463
#[stable(feature = "rust1", since = "1.0.0")]
24652464
#[cfg_attr(not(test), rustc_diagnostic_item = "process_exit")]
2466-
#[allow(missing_panic_entrypoint)]
24672465
pub fn exit(code: i32) -> ! {
24682466
crate::rt::cleanup();
24692467
crate::sys::os::exit(code)
@@ -2531,7 +2529,6 @@ pub fn exit(code: i32) -> ! {
25312529
#[cold]
25322530
#[cfg_attr(not(test), rustc_diagnostic_item = "process_abort")]
25332531
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
2534-
#[allow(missing_panic_entrypoint)]
25352532
pub fn abort() -> ! {
25362533
crate::sys::abort_internal();
25372534
}

library/std/src/sys/pal/unix/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,6 @@ pub fn cvt_nz(error: libc::c_int) -> crate::io::Result<()> {
358358
// stdlib doesn't use libc stdio buffering. In a typical Rust program, which
359359
// does not use C stdio, even a buggy libc::abort() is, in fact, safe.
360360
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
361-
#[allow(missing_panic_entrypoint)]
362361
pub fn abort_internal() -> ! {
363362
unsafe { libc::abort() }
364363
}

library/std/src/sys/pal/unix/os.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,6 @@ pub fn home_dir() -> Option<PathBuf> {
663663
}
664664
}
665665

666-
#[allow(missing_panic_entrypoint)]
667666
pub fn exit(code: i32) -> ! {
668667
crate::sys::exit_guard::unique_thread_exit();
669668
unsafe { libc::exit(code as c_int) }

0 commit comments

Comments
 (0)