From 2f4331383466ca4ed78628f35495e86d9ac47137 Mon Sep 17 00:00:00 2001 From: Matthew Kraai Date: Thu, 26 Dec 2019 05:27:55 -0800 Subject: [PATCH] Convert collapsed to shortcut reference links --- RELEASES.md | 28 +++++++++---------- src/libcore/marker.rs | 2 +- src/libcore/ops/function.rs | 8 +++--- .../graph/iterate/mod.rs | 10 +++---- src/librustc_mir/dataflow/generic.rs | 2 +- src/libstd/sync/mpsc/mod.rs | 8 +++--- src/libstd/sync/rwlock.rs | 2 +- 7 files changed, 30 insertions(+), 30 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index 5afc6f9bdc0cb..e3597473f62fd 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -4951,10 +4951,10 @@ Stabilized APIs --------------- * [`std::panic`] -* [`std::panic::catch_unwind`][] (renamed from `recover`) -* [`std::panic::resume_unwind`][] (renamed from `propagate`) -* [`std::panic::AssertUnwindSafe`][] (renamed from `AssertRecoverSafe`) -* [`std::panic::UnwindSafe`][] (renamed from `RecoverSafe`) +* [`std::panic::catch_unwind`] (renamed from `recover`) +* [`std::panic::resume_unwind`] (renamed from `propagate`) +* [`std::panic::AssertUnwindSafe`] (renamed from `AssertRecoverSafe`) +* [`std::panic::UnwindSafe`] (renamed from `RecoverSafe`) * [`str::is_char_boundary`] * [`<*const T>::as_ref`] * [`<*mut T>::as_ref`] @@ -5234,18 +5234,18 @@ Libraries --------- * Stabilized APIs: - * [`str::encode_utf16`][] (renamed from `utf16_units`) - * [`str::EncodeUtf16`][] (renamed from `Utf16Units`) + * [`str::encode_utf16`] (renamed from `utf16_units`) + * [`str::EncodeUtf16`] (renamed from `Utf16Units`) * [`Ref::map`] * [`RefMut::map`] * [`ptr::drop_in_place`] * [`time::Instant`] * [`time::SystemTime`] * [`Instant::now`] - * [`Instant::duration_since`][] (renamed from `duration_from_earlier`) + * [`Instant::duration_since`] (renamed from `duration_from_earlier`) * [`Instant::elapsed`] * [`SystemTime::now`] - * [`SystemTime::duration_since`][] (renamed from `duration_from_earlier`) + * [`SystemTime::duration_since`] (renamed from `duration_from_earlier`) * [`SystemTime::elapsed`] * Various `Add`/`Sub` impls for `Time` and `SystemTime` * [`SystemTimeError`] @@ -5432,8 +5432,8 @@ Libraries * Stabilized APIs * `Path` - * [`Path::strip_prefix`][] (renamed from relative_from) - * [`path::StripPrefixError`][] (new error type returned from strip_prefix) + * [`Path::strip_prefix`] (renamed from relative_from) + * [`path::StripPrefixError`] (new error type returned from strip_prefix) * `Ipv4Addr` * [`Ipv4Addr::is_loopback`] * [`Ipv4Addr::is_private`] @@ -5646,7 +5646,7 @@ Libraries * Stabilized APIs: [`Read::read_exact`], - [`ErrorKind::UnexpectedEof`][] (renamed from `UnexpectedEOF`), + [`ErrorKind::UnexpectedEof`] (renamed from `UnexpectedEOF`), [`fs::DirBuilder`], [`fs::DirBuilder::new`], [`fs::DirBuilder::recursive`], [`fs::DirBuilder::create`], [`os::unix::fs::DirBuilderExt`], @@ -5659,11 +5659,11 @@ Libraries [`collections::hash_set::HashSet::drain`], [`collections::binary_heap::Drain`], [`collections::binary_heap::BinaryHeap::drain`], - [`Vec::extend_from_slice`][] (renamed from `push_all`), + [`Vec::extend_from_slice`] (renamed from `push_all`), [`Mutex::get_mut`], [`Mutex::into_inner`], [`RwLock::get_mut`], [`RwLock::into_inner`], - [`Iterator::min_by_key`][] (renamed from `min_by`), - [`Iterator::max_by_key`][] (renamed from `max_by`). + [`Iterator::min_by_key`] (renamed from `min_by`), + [`Iterator::max_by_key`] (renamed from `max_by`). * The [core library][1.6co] is stable, as are most of its APIs. * [The `assert_eq!` macro supports arguments that don't implement `Sized`][1.6ae], such as arrays. In this way it behaves more like diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index 978d622156413..3b98bc1c272f0 100644 --- a/src/libcore/marker.rs +++ b/src/libcore/marker.rs @@ -142,7 +142,7 @@ pub trait Unsize { /// In either of the two scenarios above, we reject usage of such a constant in /// a pattern match. /// -/// See also the [structural match RFC][RFC1445], and [issue 63438][] which +/// See also the [structural match RFC][RFC1445], and [issue 63438] which /// motivated migrating from attribute-based design to this trait. /// /// [RFC1445]: https://github.com/rust-lang/rfcs/blob/master/text/1445-restrict-constants-in-patterns.md diff --git a/src/libcore/ops/function.rs b/src/libcore/ops/function.rs index 505a65cee3de0..04c7789fa4ff4 100644 --- a/src/libcore/ops/function.rs +++ b/src/libcore/ops/function.rs @@ -2,12 +2,12 @@ /// /// Instances of `Fn` can be called repeatedly without mutating state. /// -/// *This trait (`Fn`) is not to be confused with [function pointers][] +/// *This trait (`Fn`) is not to be confused with [function pointers] /// (`fn`).* /// /// `Fn` is implemented automatically by closures which only take immutable /// references to captured variables or don't capture anything at all, as well -/// as (safe) [function pointers][] (with some caveats, see their documentation +/// as (safe) [function pointers] (with some caveats, see their documentation /// for more details). Additionally, for any type `F` that implements `Fn`, `&F` /// implements `Fn`, too. /// @@ -78,7 +78,7 @@ pub trait Fn: FnMut { /// /// `FnMut` is implemented automatically by closures which take mutable /// references to captured variables, as well as all types that implement -/// [`Fn`], e.g., (safe) [function pointers][] (since `FnMut` is a supertrait of +/// [`Fn`], e.g., (safe) [function pointers] (since `FnMut` is a supertrait of /// [`Fn`]). Additionally, for any type `F` that implements `FnMut`, `&mut F` /// implements `FnMut`, too. /// @@ -162,7 +162,7 @@ pub trait FnMut: FnOnce { /// /// `FnOnce` is implemented automatically by closure that might consume captured /// variables, as well as all types that implement [`FnMut`], e.g., (safe) -/// [function pointers][] (since `FnOnce` is a supertrait of [`FnMut`]). +/// [function pointers] (since `FnOnce` is a supertrait of [`FnMut`]). /// /// Since both [`Fn`] and [`FnMut`] are subtraits of `FnOnce`, any instance of /// [`Fn`] or [`FnMut`] can be used where a `FnOnce` is expected. diff --git a/src/librustc_data_structures/graph/iterate/mod.rs b/src/librustc_data_structures/graph/iterate/mod.rs index 53475cdf4ba42..d9d4c7e321fb5 100644 --- a/src/librustc_data_structures/graph/iterate/mod.rs +++ b/src/librustc_data_structures/graph/iterate/mod.rs @@ -101,14 +101,14 @@ pub enum ControlFlow { pub enum NodeStatus { /// This node has been examined by the depth-first search but is not yet `Settled`. /// - /// Also referred to as "gray" or "discovered" nodes in [CLR][]. + /// Also referred to as "gray" or "discovered" nodes in [CLR]. /// /// [CLR]: https://en.wikipedia.org/wiki/Introduction_to_Algorithms Visited, /// This node and all nodes reachable from it have been examined by the depth-first search. /// - /// Also referred to as "black" or "finished" nodes in [CLR][]. + /// Also referred to as "black" or "finished" nodes in [CLR]. /// /// [CLR]: https://en.wikipedia.org/wiki/Introduction_to_Algorithms Settled, @@ -122,13 +122,13 @@ struct Event { /// A depth-first search that also tracks when all successors of a node have been examined. /// /// This is based on the DFS described in [Introduction to Algorithms (1st ed.)][CLR], hereby -/// referred to as **CLR**. However, we use the terminology in [`NodeStatus`][] above instead of +/// referred to as **CLR**. However, we use the terminology in [`NodeStatus`] above instead of /// "discovered"/"finished" or "white"/"grey"/"black". Each node begins the search with no status, /// becomes `Visited` when it is first examined by the DFS and is `Settled` when all nodes /// reachable from it have been examined. This allows us to differentiate between "tree", "back" /// and "forward" edges (see [`TriColorVisitor::node_examined`]). /// -/// Unlike the pseudocode in [CLR][], this implementation is iterative and does not use timestamps. +/// Unlike the pseudocode in [CLR], this implementation is iterative and does not use timestamps. /// We accomplish this by storing `Event`s on the stack that result in a (possible) state change /// for each node. A `Visited` event signifies that we should examine this node if it has not yet /// been `Visited` or `Settled`. When a node is examined for the first time, we mark it as @@ -246,7 +246,7 @@ where /// By checking the value of `prior_status`, this visitor can determine whether the edge /// leading to this node was a tree edge (`None`), forward edge (`Some(Settled)`) or back edge /// (`Some(Visited)`). For a full explanation of each edge type, see the "Depth-first Search" - /// chapter in [CLR][] or [wikipedia][]. + /// chapter in [CLR] or [wikipedia]. /// /// If you want to know *both* nodes linked by each edge, you'll need to modify /// `TriColorDepthFirstSearch` to store a `source` node for each `Visited` event. diff --git a/src/librustc_mir/dataflow/generic.rs b/src/librustc_mir/dataflow/generic.rs index 659ebeab65022..7eb6f5cc073df 100644 --- a/src/librustc_mir/dataflow/generic.rs +++ b/src/librustc_mir/dataflow/generic.rs @@ -10,7 +10,7 @@ //! interface, but make `Engine` and `ResultsCursor` the canonical way to perform and inspect a //! dataflow analysis. This requires porting the graphviz debugging logic to this module, deciding //! on a way to handle the `before` methods in `BitDenotation` and creating an adapter so that -//! gen-kill problems can still be evaluated efficiently. See the discussion in [#64566][] for more +//! gen-kill problems can still be evaluated efficiently. See the discussion in [#64566] for more //! information. //! //! [gk]: https://en.wikipedia.org/wiki/Data-flow_analysis#Bit_vector_problems diff --git a/src/libstd/sync/mpsc/mod.rs b/src/libstd/sync/mpsc/mod.rs index 0e334c191e7b9..4bd245ec0e797 100644 --- a/src/libstd/sync/mpsc/mod.rs +++ b/src/libstd/sync/mpsc/mod.rs @@ -286,7 +286,7 @@ mod sync; mod cache_aligned; -/// The receiving half of Rust's [`channel`][] (or [`sync_channel`]) type. +/// The receiving half of Rust's [`channel`] (or [`sync_channel`]) type. /// This half can only be owned by one thread. /// /// Messages sent to the channel can be retrieved using [`recv`]. @@ -1108,7 +1108,7 @@ impl Receiver { /// /// This function will always block the current thread if there is no data /// available and it's possible for more data to be sent. Once a message is - /// sent to the corresponding [`Sender`][] (or [`SyncSender`]), then this + /// sent to the corresponding [`Sender`] (or [`SyncSender`]), then this /// receiver will wake up and return that message. /// /// If the corresponding [`Sender`] has disconnected, or it disconnects while @@ -1194,7 +1194,7 @@ impl Receiver { /// /// This function will always block the current thread if there is no data /// available and it's possible for more data to be sent. Once a message is - /// sent to the corresponding [`Sender`][] (or [`SyncSender`]), then this + /// sent to the corresponding [`Sender`] (or [`SyncSender`]), then this /// receiver will wake up and return that message. /// /// If the corresponding [`Sender`] has disconnected, or it disconnects while @@ -1295,7 +1295,7 @@ impl Receiver { /// /// This function will always block the current thread if there is no data /// available and it's possible for more data to be sent. Once a message is - /// sent to the corresponding [`Sender`][] (or [`SyncSender`]), then this + /// sent to the corresponding [`Sender`] (or [`SyncSender`]), then this /// receiver will wake up and return that message. /// /// If the corresponding [`Sender`] has disconnected, or it disconnects while diff --git a/src/libstd/sync/rwlock.rs b/src/libstd/sync/rwlock.rs index 2ff36133a7cef..fdd29af858185 100644 --- a/src/libstd/sync/rwlock.rs +++ b/src/libstd/sync/rwlock.rs @@ -25,7 +25,7 @@ use crate::sys_common::rwlock as sys; /// The type parameter `T` represents the data that this lock protects. It is /// required that `T` satisfies [`Send`] to be shared across threads and /// [`Sync`] to allow concurrent access through readers. The RAII guards -/// returned from the locking methods implement [`Deref`][] (and [`DerefMut`] +/// returned from the locking methods implement [`Deref`] (and [`DerefMut`] /// for the `write` methods) to allow access to the content of the lock. /// /// # Poisoning