Rollup merge of #45419 - steveklabnik:fix-commonmark-renderings, r=QuietMisdreavus
Fix most rendering warnings from switching to CommonMark There's one big one lift, I'm filing a bug for it soon. r? @rust-lang/docs
This commit is contained in:
commit
6ed7927fa0
src
liballoc
libcore
libstd
@ -70,7 +70,7 @@ impl Layout {
|
||||
///
|
||||
/// * `align` must be a power of two,
|
||||
///
|
||||
/// * `align` must not exceed 2^31 (i.e. `1 << 31`),
|
||||
/// * `align` must not exceed 2<sup>31</sup> (i.e. `1 << 31`),
|
||||
///
|
||||
/// * `size`, when rounded up to the nearest multiple of `align`,
|
||||
/// must not overflow (i.e. the rounded value must be less than
|
||||
@ -113,7 +113,7 @@ impl Layout {
|
||||
/// # Safety
|
||||
///
|
||||
/// This function is unsafe as it does not verify that `align` is
|
||||
/// a power-of-two that is also less than or equal to 2^31, nor
|
||||
/// a power-of-two that is also less than or equal to 2<sup>31</sup>, nor
|
||||
/// that `size` aligned to `align` fits within the address space
|
||||
/// (i.e. the `Layout::from_size_align` preconditions).
|
||||
#[inline]
|
||||
@ -227,7 +227,7 @@ impl Layout {
|
||||
};
|
||||
|
||||
// We can assume that `self.align` is a power-of-two that does
|
||||
// not exceed 2^31. Furthermore, `alloc_size` has already been
|
||||
// not exceed 2<sup>31</sup>. Furthermore, `alloc_size` has already been
|
||||
// rounded up to a multiple of `self.align`; therefore, the
|
||||
// call to `Layout::from_size_align` below should never panic.
|
||||
Some((Layout::from_size_align(alloc_size, self.align).unwrap(), padded_size))
|
||||
|
@ -475,7 +475,6 @@
|
||||
//! them with the same character. For example, the `{` character is escaped with
|
||||
//! `{{` and the `}` character is escaped with `}}`.
|
||||
//!
|
||||
//! [`format!`]: ../../macro.format.html
|
||||
//! [`usize`]: ../../std/primitive.usize.html
|
||||
//! [`isize`]: ../../std/primitive.isize.html
|
||||
//! [`i8`]: ../../std/primitive.i8.html
|
||||
|
@ -22,7 +22,7 @@ use mem;
|
||||
/// This is currently the default hashing function used by standard library
|
||||
/// (eg. `collections::HashMap` uses it by default).
|
||||
///
|
||||
/// See: https://131002.net/siphash/
|
||||
/// See: <https://131002.net/siphash>
|
||||
#[unstable(feature = "sip_hash_13", issue = "34767")]
|
||||
#[rustc_deprecated(since = "1.13.0",
|
||||
reason = "use `std::collections::hash_map::DefaultHasher` instead")]
|
||||
@ -33,7 +33,7 @@ pub struct SipHasher13 {
|
||||
|
||||
/// An implementation of SipHash 2-4.
|
||||
///
|
||||
/// See: https://131002.net/siphash/
|
||||
/// See: <https://131002.net/siphash/>
|
||||
#[unstable(feature = "sip_hash_13", issue = "34767")]
|
||||
#[rustc_deprecated(since = "1.13.0",
|
||||
reason = "use `std::collections::hash_map::DefaultHasher` instead")]
|
||||
@ -44,7 +44,7 @@ pub struct SipHasher24 {
|
||||
|
||||
/// An implementation of SipHash 2-4.
|
||||
///
|
||||
/// See: https://131002.net/siphash/
|
||||
/// See: <https://131002.net/siphash/>
|
||||
///
|
||||
/// SipHash is a general-purpose hashing function: it runs at a good
|
||||
/// speed (competitive with Spooky and City) and permits strong _keyed_
|
||||
|
@ -551,7 +551,7 @@ impl<T: ?Sized> *const T {
|
||||
///
|
||||
/// Most platforms fundamentally can't even construct such an allocation.
|
||||
/// For instance, no known 64-bit platform can ever serve a request
|
||||
/// for 2^63 bytes due to page-table limitations or splitting the address space.
|
||||
/// for 2<sup>63</sup> bytes due to page-table limitations or splitting the address space.
|
||||
/// However, some 32-bit and 16-bit platforms may successfully serve a request for
|
||||
/// more than `isize::MAX` bytes with things like Physical Address
|
||||
/// Extension. As such, memory acquired directly from allocators or memory
|
||||
@ -684,7 +684,7 @@ impl<T: ?Sized> *const T {
|
||||
///
|
||||
/// Most platforms fundamentally can't even construct such an allocation.
|
||||
/// For instance, no known 64-bit platform can ever serve a request
|
||||
/// for 2^63 bytes due to page-table limitations or splitting the address space.
|
||||
/// for 2<sup>63</sup> bytes due to page-table limitations or splitting the address space.
|
||||
/// However, some 32-bit and 16-bit platforms may successfully serve a request for
|
||||
/// more than `isize::MAX` bytes with things like Physical Address
|
||||
/// Extension. As such, memory acquired directly from allocators or memory
|
||||
@ -743,7 +743,7 @@ impl<T: ?Sized> *const T {
|
||||
///
|
||||
/// Most platforms fundamentally can't even construct such an allocation.
|
||||
/// For instance, no known 64-bit platform can ever serve a request
|
||||
/// for 2^63 bytes due to page-table limitations or splitting the address space.
|
||||
/// for 2<sup>63</sup> bytes due to page-table limitations or splitting the address space.
|
||||
/// However, some 32-bit and 16-bit platforms may successfully serve a request for
|
||||
/// more than `isize::MAX` bytes with things like Physical Address
|
||||
/// Extension. As such, memory acquired directly from allocators or memory
|
||||
@ -1182,7 +1182,7 @@ impl<T: ?Sized> *mut T {
|
||||
///
|
||||
/// Most platforms fundamentally can't even construct such an allocation.
|
||||
/// For instance, no known 64-bit platform can ever serve a request
|
||||
/// for 2^63 bytes due to page-table limitations or splitting the address space.
|
||||
/// for 2<sup>63</sup> bytes due to page-table limitations or splitting the address space.
|
||||
/// However, some 32-bit and 16-bit platforms may successfully serve a request for
|
||||
/// more than `isize::MAX` bytes with things like Physical Address
|
||||
/// Extension. As such, memory acquired directly from allocators or memory
|
||||
@ -1382,7 +1382,7 @@ impl<T: ?Sized> *mut T {
|
||||
///
|
||||
/// Most platforms fundamentally can't even construct such an allocation.
|
||||
/// For instance, no known 64-bit platform can ever serve a request
|
||||
/// for 2^63 bytes due to page-table limitations or splitting the address space.
|
||||
/// for 2<sup>63</sup> bytes due to page-table limitations or splitting the address space.
|
||||
/// However, some 32-bit and 16-bit platforms may successfully serve a request for
|
||||
/// more than `isize::MAX` bytes with things like Physical Address
|
||||
/// Extension. As such, memory acquired directly from allocators or memory
|
||||
@ -1441,7 +1441,7 @@ impl<T: ?Sized> *mut T {
|
||||
///
|
||||
/// Most platforms fundamentally can't even construct such an allocation.
|
||||
/// For instance, no known 64-bit platform can ever serve a request
|
||||
/// for 2^63 bytes due to page-table limitations or splitting the address space.
|
||||
/// for 2<sup>63</sup> bytes due to page-table limitations or splitting the address space.
|
||||
/// However, some 32-bit and 16-bit platforms may successfully serve a request for
|
||||
/// more than `isize::MAX` bytes with things like Physical Address
|
||||
/// Extension. As such, memory acquired directly from allocators or memory
|
||||
|
@ -411,10 +411,12 @@ pub trait AsciiExt {
|
||||
fn is_ascii_hexdigit(&self) -> bool { unimplemented!(); }
|
||||
|
||||
/// Checks if the value is an ASCII punctuation character:
|
||||
///
|
||||
/// U+0021 ... U+002F `! " # $ % & ' ( ) * + , - . /`
|
||||
/// U+003A ... U+0040 `: ; < = > ? @`
|
||||
/// U+005B ... U+0060 `[ \\ ] ^ _ \``
|
||||
/// U+005B ... U+0060 ``[ \\ ] ^ _ ` ``
|
||||
/// U+007B ... U+007E `{ | } ~`
|
||||
///
|
||||
/// For strings, true if all characters in the string are
|
||||
/// ASCII punctuation.
|
||||
///
|
||||
|
@ -41,7 +41,7 @@ use sys_common::{AsInner, IntoInner, FromInner};
|
||||
/// # Creating an `OsString`
|
||||
///
|
||||
/// **From a Rust string**: `OsString` implements
|
||||
/// [`From`]`<`[`String`]`>`, so you can use `my_string.`[`from`] to
|
||||
/// [`From`]`<`[`String`]`>`, so you can use `my_string.from` to
|
||||
/// create an `OsString` from a normal Rust string.
|
||||
///
|
||||
/// **From slices:** Just like you can start with an empty Rust
|
||||
@ -63,7 +63,6 @@ use sys_common::{AsInner, IntoInner, FromInner};
|
||||
///
|
||||
/// [`OsStr`]: struct.OsStr.html
|
||||
/// [`From`]: ../convert/trait.From.html
|
||||
/// [`from`]: ../convert/trait.From.html#tymethod.from
|
||||
/// [`String`]: ../string/struct.String.html
|
||||
/// [`&str`]: ../primitive.str.html
|
||||
/// [`u8`]: ../primitive.u8.html
|
||||
|
@ -168,7 +168,7 @@ impl UdpSocket {
|
||||
/// This will return an error when the IP version of the local socket
|
||||
/// does not match that returned from [`ToSocketAddrs`].
|
||||
///
|
||||
/// See https://github.com/rust-lang/rust/issues/34202 for more details.
|
||||
/// See <https://github.com/rust-lang/rust/issues/34202> for more details.
|
||||
///
|
||||
/// [`ToSocketAddrs`]: ../../std/net/trait.ToSocketAddrs.html
|
||||
///
|
||||
|
@ -343,7 +343,7 @@ impl Command {
|
||||
/// The search path to be used may be controlled by setting the
|
||||
/// `PATH` environment variable on the Command,
|
||||
/// but this has some implementation limitations on Windows
|
||||
/// (see https://github.com/rust-lang/rust/issues/37519).
|
||||
/// (see <https://github.com/rust-lang/rust/issues/37519>).
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
@ -32,7 +32,7 @@ pub trait FileExt {
|
||||
/// function, it is set to the end of the read.
|
||||
///
|
||||
/// Reading beyond the end of the file will always return with a length of
|
||||
/// 0.
|
||||
/// 0\.
|
||||
///
|
||||
/// Note that similar to `File::read`, it is not an error to return with a
|
||||
/// short read. When returning from such a short read, the file pointer is
|
||||
|
Loading…
Reference in New Issue
Block a user