Skip to content

Commit f8f9005

Browse files
committed
Fix most rendering warnings from switching to CommonMark
1 parent 95272a0 commit f8f9005

File tree

9 files changed

+19
-19
lines changed

9 files changed

+19
-19
lines changed

src/liballoc/allocator.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ impl Layout {
7070
///
7171
/// * `align` must be a power of two,
7272
///
73-
/// * `align` must not exceed 2^31 (i.e. `1 << 31`),
73+
/// * `align` must not exceed 2<sup>31</sup> (i.e. `1 << 31`),
7474
///
7575
/// * `size`, when rounded up to the nearest multiple of `align`,
7676
/// must not overflow (i.e. the rounded value must be less than
@@ -113,7 +113,7 @@ impl Layout {
113113
/// # Safety
114114
///
115115
/// This function is unsafe as it does not verify that `align` is
116-
/// a power-of-two that is also less than or equal to 2^31, nor
116+
/// a power-of-two that is also less than or equal to 2<sup>31</sup>, nor
117117
/// that `size` aligned to `align` fits within the address space
118118
/// (i.e. the `Layout::from_size_align` preconditions).
119119
#[inline]
@@ -227,7 +227,7 @@ impl Layout {
227227
};
228228

229229
// We can assume that `self.align` is a power-of-two that does
230-
// not exceed 2^31. Furthermore, `alloc_size` has already been
230+
// not exceed 2<sup>31</sup>. Furthermore, `alloc_size` has already been
231231
// rounded up to a multiple of `self.align`; therefore, the
232232
// call to `Layout::from_size_align` below should never panic.
233233
Some((Layout::from_size_align(alloc_size, self.align).unwrap(), padded_size))

src/liballoc/fmt.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,6 @@
475475
//! them with the same character. For example, the `{` character is escaped with
476476
//! `{{` and the `}` character is escaped with `}}`.
477477
//!
478-
//! [`format!`]: ../../macro.format.html
479478
//! [`usize`]: ../../std/primitive.usize.html
480479
//! [`isize`]: ../../std/primitive.isize.html
481480
//! [`i8`]: ../../std/primitive.i8.html

src/libcore/hash/sip.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use mem;
2222
/// This is currently the default hashing function used by standard library
2323
/// (eg. `collections::HashMap` uses it by default).
2424
///
25-
/// See: https://131002.net/siphash/
25+
/// See: <https://131002.net/siphash>
2626
#[unstable(feature = "sip_hash_13", issue = "34767")]
2727
#[rustc_deprecated(since = "1.13.0",
2828
reason = "use `std::collections::hash_map::DefaultHasher` instead")]
@@ -33,7 +33,7 @@ pub struct SipHasher13 {
3333

3434
/// An implementation of SipHash 2-4.
3535
///
36-
/// See: https://131002.net/siphash/
36+
/// See: <https://131002.net/siphash/>
3737
#[unstable(feature = "sip_hash_13", issue = "34767")]
3838
#[rustc_deprecated(since = "1.13.0",
3939
reason = "use `std::collections::hash_map::DefaultHasher` instead")]
@@ -44,7 +44,7 @@ pub struct SipHasher24 {
4444

4545
/// An implementation of SipHash 2-4.
4646
///
47-
/// See: https://131002.net/siphash/
47+
/// See: <https://131002.net/siphash/>
4848
///
4949
/// SipHash is a general-purpose hashing function: it runs at a good
5050
/// speed (competitive with Spooky and City) and permits strong _keyed_

src/libcore/ptr.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ impl<T: ?Sized> *const T {
551551
///
552552
/// Most platforms fundamentally can't even construct such an allocation.
553553
/// For instance, no known 64-bit platform can ever serve a request
554-
/// for 2^63 bytes due to page-table limitations or splitting the address space.
554+
/// for 2<sup>63</sup> bytes due to page-table limitations or splitting the address space.
555555
/// However, some 32-bit and 16-bit platforms may successfully serve a request for
556556
/// more than `isize::MAX` bytes with things like Physical Address
557557
/// Extension. As such, memory acquired directly from allocators or memory
@@ -684,7 +684,7 @@ impl<T: ?Sized> *const T {
684684
///
685685
/// Most platforms fundamentally can't even construct such an allocation.
686686
/// For instance, no known 64-bit platform can ever serve a request
687-
/// for 2^63 bytes due to page-table limitations or splitting the address space.
687+
/// for 2<sup>63</sup> bytes due to page-table limitations or splitting the address space.
688688
/// However, some 32-bit and 16-bit platforms may successfully serve a request for
689689
/// more than `isize::MAX` bytes with things like Physical Address
690690
/// Extension. As such, memory acquired directly from allocators or memory
@@ -743,7 +743,7 @@ impl<T: ?Sized> *const T {
743743
///
744744
/// Most platforms fundamentally can't even construct such an allocation.
745745
/// For instance, no known 64-bit platform can ever serve a request
746-
/// for 2^63 bytes due to page-table limitations or splitting the address space.
746+
/// for 2<sup>63</sup> bytes due to page-table limitations or splitting the address space.
747747
/// However, some 32-bit and 16-bit platforms may successfully serve a request for
748748
/// more than `isize::MAX` bytes with things like Physical Address
749749
/// Extension. As such, memory acquired directly from allocators or memory
@@ -1182,7 +1182,7 @@ impl<T: ?Sized> *mut T {
11821182
///
11831183
/// Most platforms fundamentally can't even construct such an allocation.
11841184
/// For instance, no known 64-bit platform can ever serve a request
1185-
/// for 2^63 bytes due to page-table limitations or splitting the address space.
1185+
/// for 2<sup>63</sup> bytes due to page-table limitations or splitting the address space.
11861186
/// However, some 32-bit and 16-bit platforms may successfully serve a request for
11871187
/// more than `isize::MAX` bytes with things like Physical Address
11881188
/// Extension. As such, memory acquired directly from allocators or memory
@@ -1382,7 +1382,7 @@ impl<T: ?Sized> *mut T {
13821382
///
13831383
/// Most platforms fundamentally can't even construct such an allocation.
13841384
/// For instance, no known 64-bit platform can ever serve a request
1385-
/// for 2^63 bytes due to page-table limitations or splitting the address space.
1385+
/// for 2<sup>63</sup> bytes due to page-table limitations or splitting the address space.
13861386
/// However, some 32-bit and 16-bit platforms may successfully serve a request for
13871387
/// more than `isize::MAX` bytes with things like Physical Address
13881388
/// Extension. As such, memory acquired directly from allocators or memory
@@ -1441,7 +1441,7 @@ impl<T: ?Sized> *mut T {
14411441
///
14421442
/// Most platforms fundamentally can't even construct such an allocation.
14431443
/// For instance, no known 64-bit platform can ever serve a request
1444-
/// for 2^63 bytes due to page-table limitations or splitting the address space.
1444+
/// for 2<sup>63</sup> bytes due to page-table limitations or splitting the address space.
14451445
/// However, some 32-bit and 16-bit platforms may successfully serve a request for
14461446
/// more than `isize::MAX` bytes with things like Physical Address
14471447
/// Extension. As such, memory acquired directly from allocators or memory

src/libstd/ascii.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,10 +411,12 @@ pub trait AsciiExt {
411411
fn is_ascii_hexdigit(&self) -> bool { unimplemented!(); }
412412

413413
/// Checks if the value is an ASCII punctuation character:
414+
///
414415
/// U+0021 ... U+002F `! " # $ % & ' ( ) * + , - . /`
415416
/// U+003A ... U+0040 `: ; < = > ? @`
416-
/// U+005B ... U+0060 `[ \\ ] ^ _ \``
417+
/// U+005B ... U+0060 ``[ \\ ] ^ _ ` ``
417418
/// U+007B ... U+007E `{ | } ~`
419+
///
418420
/// For strings, true if all characters in the string are
419421
/// ASCII punctuation.
420422
///

src/libstd/ffi/os_str.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ use sys_common::{AsInner, IntoInner, FromInner};
4141
/// # Creating an `OsString`
4242
///
4343
/// **From a Rust string**: `OsString` implements
44-
/// [`From`]`<`[`String`]`>`, so you can use `my_string.`[`from`] to
44+
/// [`From`]`<`[`String`]`>`, so you can use `my_string.from` to
4545
/// create an `OsString` from a normal Rust string.
4646
///
4747
/// **From slices:** Just like you can start with an empty Rust
@@ -63,7 +63,6 @@ use sys_common::{AsInner, IntoInner, FromInner};
6363
///
6464
/// [`OsStr`]: struct.OsStr.html
6565
/// [`From`]: ../convert/trait.From.html
66-
/// [`from`]: ../convert/trait.From.html#tymethod.from
6766
/// [`String`]: ../string/struct.String.html
6867
/// [`&str`]: ../primitive.str.html
6968
/// [`u8`]: ../primitive.u8.html

src/libstd/net/udp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ impl UdpSocket {
168168
/// This will return an error when the IP version of the local socket
169169
/// does not match that returned from [`ToSocketAddrs`].
170170
///
171-
/// See https://github.com/rust-lang/rust/issues/34202 for more details.
171+
/// See <https://github.com/rust-lang/rust/issues/34202> for more details.
172172
///
173173
/// [`ToSocketAddrs`]: ../../std/net/trait.ToSocketAddrs.html
174174
///

src/libstd/process.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ impl Command {
343343
/// The search path to be used may be controlled by setting the
344344
/// `PATH` environment variable on the Command,
345345
/// but this has some implementation limitations on Windows
346-
/// (see https://github.com/rust-lang/rust/issues/37519).
346+
/// (see <https://github.com/rust-lang/rust/issues/37519>).
347347
///
348348
/// # Examples
349349
///

src/libstd/sys/windows/ext/fs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub trait FileExt {
3232
/// function, it is set to the end of the read.
3333
///
3434
/// Reading beyond the end of the file will always return with a length of
35-
/// 0.
35+
/// 0\.
3636
///
3737
/// Note that similar to `File::read`, it is not an error to return with a
3838
/// short read. When returning from such a short read, the file pointer is

0 commit comments

Comments
 (0)