Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion library/alloc/src/collections/binary_heap/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@
//! }
//! ```

#![allow(missing_docs)]
#![stable(feature = "rust1", since = "1.0.0")]

use core::alloc::Allocator;
Expand Down Expand Up @@ -1797,6 +1796,7 @@ unsafe impl<I> AsVecIntoIter for IntoIter<I> {
}
}

/// Iterator which retrieves elements in heap order.
#[must_use = "iterators are lazy and do nothing unless consumed"]
#[unstable(feature = "binary_heap_into_iter_sorted", issue = "59278")]
#[derive(Clone, Debug)]
Expand Down
1 change: 0 additions & 1 deletion library/alloc/src/io/buffered/bufreader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ impl<R: ?Sized> BufReader<R> {
impl<R: ?Sized> BufReader<R> {
#[doc(hidden)]
#[unstable(feature = "core_io_internals", reason = "exposed only for libstd", issue = "none")]
#[allow(missing_docs)]
pub fn initialized(&self) -> bool {
self.buf.initialized()
}
Expand Down
1 change: 1 addition & 0 deletions library/core/src/alloc/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,7 @@ impl Layout {
note = "Name does not follow std convention, use LayoutError",
suggestion = "LayoutError"
)]
/// Old name of [`LayoutError`].
pub type LayoutErr = LayoutError;

/// The `LayoutError` is returned when the parameters given
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ pub trait Error: Debug + Display {
since = "1.33.0",
note = "replaced by Error::source, which can support downcasting"
)]
#[allow(missing_docs)]
/// Replaced by [`Error::source`].
fn cause(&self) -> Option<&dyn Error> {
self.source()
}
Expand Down
6 changes: 5 additions & 1 deletion library/core/src/intrinsics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,19 @@ use crate::sync::atomic::{
/// A type for atomic ordering parameters for intrinsics. This is a separate type from
/// `atomic::Ordering` so that we can make it `ConstParamTy` and fix the values used here without a
/// risk of leaking that to stable code.
#[allow(missing_docs)]
#[derive(Debug, ConstParamTy, PartialEq, Eq)]
pub enum AtomicOrdering {
// These values must match the compiler's `AtomicOrdering` defined in
// `rustc_middle/src/ty/consts/int.rs`!
/// [`Ordering::Relaxed`][`crate::sync::atomic::Ordering::Relaxed`]
Relaxed = 0,
/// [`Ordering::Release`][`crate::sync::atomic::Ordering::Release`]
Release = 1,
/// [`Ordering::Acquire`][`crate::sync::atomic::Ordering::Acquire`]
Acquire = 2,
/// [`Ordering::AcqRel`][`crate::sync::atomic::Ordering::AcqRel`]
AcqRel = 3,
/// [`Ordering::SeqCst`][`crate::sync::atomic::Ordering::SeqCst`]
SeqCst = 4,
}

Expand Down
1 change: 0 additions & 1 deletion library/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,6 @@ pub mod future;
pub mod task;

/* Heap memory allocator trait */
#[allow(missing_docs)]
pub mod alloc;

// note: does not need to be public
Expand Down
17 changes: 10 additions & 7 deletions library/core/src/panicking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
//! necessary lang items for the compiler. All panics are funneled through this
//! one function. The actual symbol is declared through the `#[panic_handler]` attribute.

#![allow(dead_code, missing_docs)]
#![allow(dead_code)]
#![unstable(
feature = "panic_internals",
reason = "internal details of the implementation of the `panic!` and related macros",
Expand Down Expand Up @@ -182,6 +182,7 @@ macro_rules! panic_const {
// slightly different forms. It's not clear if there's a good way to deduplicate without adding
// special cases to the compiler (e.g., a const generic function wouldn't have a single definition
// shared across crates, which is exactly what we want here).
#[allow(missing_docs)]
pub mod panic_const {
use super::*;
panic_const! {
Expand Down Expand Up @@ -233,9 +234,10 @@ pub fn panic_nounwind_nobacktrace(expr: &'static str) -> ! {
panic_nounwind_fmt(fmt::Arguments::from_str(expr), /* force_no_backtrace */ true);
}

/// Needed by `non-fmt-panics` lint.
#[inline]
#[track_caller]
#[rustc_diagnostic_item = "unreachable_display"] // needed for `non-fmt-panics` lint
#[rustc_diagnostic_item = "unreachable_display"]
Comment on lines +237 to +240

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please undo all these comment changes, they lose the meaning of the comment. The comment was meant to explain the attribute.

pub fn unreachable_display<T: fmt::Display>(x: &T) -> ! {
panic_fmt(format_args!("internal error: entered unreachable code: {}", *x));
}
Expand All @@ -250,9 +252,10 @@ pub const fn panic_str_2015(expr: &str) -> ! {
panic_display(&expr);
}

/// Needed for const-evaluated panics.
#[inline]
#[track_caller]
#[lang = "panic_display"] // needed for const-evaluated panics
#[lang = "panic_display"]
#[rustc_do_not_const_check] // hooked by const-eval
#[rustc_const_stable_indirect] // must follow stable const rules since it is exposed to stable
pub const fn panic_display<T: fmt::Display>(x: &T) -> ! {
Expand Down Expand Up @@ -457,31 +460,31 @@ fn assert_failed_inner(
}
}

// panic!() without args expands to this, to generate slightly less code
/// `panic!()` without args expands to this, to generate slightly less code.
#[cfg_attr(not(panic = "immediate-abort"), inline(never), cold)]
#[cfg_attr(panic = "immediate-abort", inline)]
#[track_caller]
pub const fn panic_default_msg() -> ! {
panic("explicit panic")
}

// unreachable!() without args expands to this, to generate slightly less code
/// `unreachable!()` without args expands to this, to generate slightly less code.
#[cfg_attr(not(panic = "immediate-abort"), inline(never), cold)]
#[cfg_attr(panic = "immediate-abort", inline)]
#[track_caller]
pub const fn unreachable_default_msg() -> ! {
panic("internal error: entered unreachable code")
}

// unimplemented!() without args expands to this, to generate slightly less code
/// `unimplemented!()` without args expands to this, to generate slightly less code.
#[cfg_attr(not(panic = "immediate-abort"), inline(never), cold)]
#[cfg_attr(panic = "immediate-abort", inline)]
#[track_caller]
pub const fn unimplemented_default_msg() -> ! {
panic("not implemented")
}

// todo!() without args expands to this, to generate slightly less code
/// `todo!()` without args expands to this, to generate slightly less code.
#[cfg_attr(not(panic = "immediate-abort"), inline(never), cold)]
#[cfg_attr(panic = "immediate-abort", inline)]
#[track_caller]
Expand Down
8 changes: 6 additions & 2 deletions library/std/src/net/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1110,16 +1110,20 @@ impl TcpListener {
self.0.hop_limit_v6()
}

/// Only allow v6 for this socket.
///
/// ⚠️: This option can only be set before the socket is bound.
#[stable(feature = "net2_mutators", since = "1.9.0")]
#[deprecated(since = "1.16.0", note = "this option can only be set before the socket is bound")]
#[allow(missing_docs)]
pub fn set_only_v6(&self, only_v6: bool) -> io::Result<()> {
self.0.set_only_v6(only_v6)
}

/// Checks if this socket only allow v6.
///
/// ⚠️: This option can only be set before the socket is bound.
#[stable(feature = "net2_mutators", since = "1.9.0")]
#[deprecated(since = "1.16.0", note = "this option can only be set before the socket is bound")]
#[allow(missing_docs)]
pub fn only_v6(&self) -> io::Result<bool> {
self.0.only_v6()
}
Expand Down
1 change: 0 additions & 1 deletion library/std/src/num/f32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
//! defined directly on the `f32` type.

#![stable(feature = "rust1", since = "1.0.0")]
#![allow(missing_docs)]

#[stable(feature = "rust1", since = "1.0.0")]
#[allow(deprecated, clippy::legacy_numeric_constants)]
Expand Down
1 change: 0 additions & 1 deletion library/std/src/num/f64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
//! defined directly on the `f64` type.

#![stable(feature = "rust1", since = "1.0.0")]
#![allow(missing_docs)]

#[stable(feature = "rust1", since = "1.0.0")]
#[allow(deprecated, clippy::legacy_numeric_constants)]
Expand Down
1 change: 0 additions & 1 deletion library/std/src/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
//! work. See the individual documentation for each piece for more information.

#![stable(feature = "rust1", since = "1.0.0")]
#![allow(missing_docs)]

#[unstable(feature = "complex_numbers", issue = "154023")]
pub use core::num::Complex;
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/sys/pal/unix/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(missing_docs, nonstandard_style)]
#![allow(nonstandard_style)]

use crate::io;

Expand Down
Loading