docs(std): add missing closing code block fences in doc comments
This commit is contained in:
parent
94722cabf4
commit
5a9e2e4aa8
7 changed files with 7 additions and 2 deletions
|
|
@ -321,6 +321,7 @@ impl<A: Default, B: Default> Default for Chain<A, B> {
|
|||
///
|
||||
/// // take requires `Default`
|
||||
/// let _: Chain<_, _> = mem::take(&mut foo.0);
|
||||
/// ```
|
||||
fn default() -> Self {
|
||||
Chain::new(Default::default(), Default::default())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1285,7 +1285,7 @@ macro_rules! int_impl {
|
|||
///
|
||||
/// ```should_panic
|
||||
#[doc = concat!("let _ = ", stringify!($SelfT), "::MIN.strict_neg();")]
|
||||
///
|
||||
/// ```
|
||||
#[stable(feature = "strict_overflow_ops", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "strict_overflow_ops", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[must_use = "this returns the result of the operation, \
|
||||
|
|
|
|||
|
|
@ -1620,7 +1620,7 @@ macro_rules! uint_impl {
|
|||
///
|
||||
/// ```should_panic
|
||||
#[doc = concat!("let _ = 1", stringify!($SelfT), ".strict_neg();")]
|
||||
///
|
||||
/// ```
|
||||
#[stable(feature = "strict_overflow_ops", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "strict_overflow_ops", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[must_use = "this returns the result of the operation, \
|
||||
|
|
|
|||
|
|
@ -836,6 +836,7 @@ pub trait RangeBounds<T: ?Sized> {
|
|||
/// assert!(!(0.0..1.0).contains(&f32::NAN));
|
||||
/// assert!(!(0.0..f32::NAN).contains(&0.5));
|
||||
/// assert!(!(f32::NAN..1.0).contains(&0.5));
|
||||
/// ```
|
||||
#[inline]
|
||||
#[stable(feature = "range_contains", since = "1.35.0")]
|
||||
fn contains<U>(&self, item: &U) -> bool
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ impl<T: PointeeSized> *mut T {
|
|||
///
|
||||
/// // This dereference is UB. The pointer only has provenance for `x` but points to `y`.
|
||||
/// println!("{:?}", unsafe { &*bad });
|
||||
/// ```
|
||||
#[unstable(feature = "set_ptr_value", issue = "75091")]
|
||||
#[must_use = "returns a new pointer rather than modifying its argument"]
|
||||
#[inline]
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ pub trait SimdInt: Copy + Sealed {
|
|||
/// let sat = x.saturating_sub(max);
|
||||
/// assert_eq!(unsat, Simd::from_array([1, MAX, MIN, 0]));
|
||||
/// assert_eq!(sat, Simd::from_array([MIN, MIN, MIN, 0]));
|
||||
/// ```
|
||||
fn saturating_sub(self, second: Self) -> Self;
|
||||
|
||||
/// Lanewise absolute value, implemented in Rust.
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ pub trait SimdUint: Copy + Sealed {
|
|||
/// let sat = x.saturating_sub(max);
|
||||
/// assert_eq!(unsat, Simd::from_array([3, 2, 1, 0]));
|
||||
/// assert_eq!(sat, Simd::splat(0));
|
||||
/// ```
|
||||
fn saturating_sub(self, second: Self) -> Self;
|
||||
|
||||
/// Lanewise absolute difference.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue