Skip to content

Commit c1ad1b0

Browse files
Fix invalid urls
1 parent 1b3382f commit c1ad1b0

File tree

9 files changed

+19
-42
lines changed

9 files changed

+19
-42
lines changed

src/liballoc/rc.rs

+3-7
Original file line numberDiff line numberDiff line change
@@ -806,9 +806,7 @@ unsafe impl<#[may_dangle] T: ?Sized> Drop for Rc<T> {
806806
///
807807
/// This will decrement the strong reference count. If the strong reference
808808
/// count reaches zero then the only other references (if any) are
809-
/// [`Weak`][weak], so we `drop` the inner value.
810-
///
811-
/// [weak]: struct.Weak.html
809+
/// [`Weak`], so we `drop` the inner value.
812810
///
813811
/// # Examples
814812
///
@@ -1173,9 +1171,8 @@ impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Weak<U>> for Weak<T> {}
11731171

11741172
impl<T> Weak<T> {
11751173
/// Constructs a new `Weak<T>`, without allocating any memory.
1176-
/// Calling [`upgrade`] on the return value always gives [`None`].
1174+
/// Calling [`upgrade`][Weak::upgrade] on the return value always gives [`None`].
11771175
///
1178-
/// [`upgrade`]: struct.Weak.html#method.upgrade
11791176
/// [`None`]: ../../std/option/enum.Option.html
11801177
///
11811178
/// # Examples
@@ -1321,9 +1318,8 @@ impl<T: ?Sized + fmt::Debug> fmt::Debug for Weak<T> {
13211318
#[stable(feature = "downgraded_weak", since = "1.10.0")]
13221319
impl<T> Default for Weak<T> {
13231320
/// Constructs a new `Weak<T>`, allocating memory for `T` without initializing
1324-
/// it. Calling [`upgrade`] on the return value always gives [`None`].
1321+
/// it. Calling [`upgrade`][Weak::upgrade] on the return value always gives [`None`].
13251322
///
1326-
/// [`upgrade`]: struct.Weak.html#method.upgrade
13271323
/// [`None`]: ../../std/option/enum.Option.html
13281324
///
13291325
/// # Examples

src/liballoc/string.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1927,9 +1927,7 @@ impl<'a> Add<&'a str> for String {
19271927

19281928
/// Implements the `+=` operator for appending to a `String`.
19291929
///
1930-
/// This has the same behavior as the [`push_str`] method.
1931-
///
1932-
/// [`push_str`]: struct.String.html#method.push_str
1930+
/// This has the same behavior as the [`push_str`][String::push_str] method.
19331931
#[stable(feature = "stringaddassign", since = "1.12.0")]
19341932
impl<'a> AddAssign<&'a str> for String {
19351933
#[inline]

src/liballoc/sync.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -916,9 +916,7 @@ unsafe impl<#[may_dangle] T: ?Sized> Drop for Arc<T> {
916916
///
917917
/// This will decrement the strong reference count. If the strong reference
918918
/// count reaches zero then the only other references (if any) are
919-
/// [`Weak`][weak], so we `drop` the inner value.
920-
///
921-
/// [weak]: struct.Weak.html
919+
/// [`Weak`], so we `drop` the inner value.
922920
///
923921
/// # Examples
924922
///
@@ -1159,9 +1157,9 @@ impl<T: ?Sized> Clone for Weak<T> {
11591157
#[stable(feature = "downgraded_weak", since = "1.10.0")]
11601158
impl<T> Default for Weak<T> {
11611159
/// Constructs a new `Weak<T>`, without allocating memory.
1162-
/// Calling [`upgrade`] on the return value always gives [`None`].
1160+
/// Calling [`upgrade`][Weak::upgrade] on the return value always
1161+
/// gives [`None`].
11631162
///
1164-
/// [`upgrade`]: struct.Weak.html#method.upgrade
11651163
/// [`None`]: ../../std/option/enum.Option.html#variant.None
11661164
///
11671165
/// # Examples

src/libcore/option.rs

+5-7
Original file line numberDiff line numberDiff line change
@@ -1006,9 +1006,7 @@ fn expect_failed(msg: &str) -> ! {
10061006

10071007
#[stable(feature = "rust1", since = "1.0.0")]
10081008
impl<T> Default for Option<T> {
1009-
/// Returns [`None`].
1010-
///
1011-
/// [`None`]: #variant.None
1009+
/// Returns [`None`][Option::None].
10121010
#[inline]
10131011
fn default() -> Option<T> { None }
10141012
}
@@ -1228,9 +1226,10 @@ unsafe impl<A> TrustedLen for IntoIter<A> {}
12281226

12291227
#[stable(feature = "rust1", since = "1.0.0")]
12301228
impl<A, V: FromIterator<A>> FromIterator<Option<A>> for Option<V> {
1231-
/// Takes each element in the [`Iterator`]: if it is [`None`], no further
1232-
/// elements are taken, and the [`None`] is returned. Should no [`None`] occur, a
1233-
/// container with the values of each `Option` is returned.
1229+
/// Takes each element in the [`Iterator`]: if it is [`None`][Option::None],
1230+
/// no further elements are taken, and the [`None`][Option::None] is
1231+
/// returned. Should no [`None`][Option::None] occur, a container with the
1232+
/// values of each [`Option`] is returned.
12341233
///
12351234
/// Here is an example which increments every integer in a vector,
12361235
/// checking for overflow:
@@ -1247,7 +1246,6 @@ impl<A, V: FromIterator<A>> FromIterator<Option<A>> for Option<V> {
12471246
/// ```
12481247
///
12491248
/// [`Iterator`]: ../iter/trait.Iterator.html
1250-
/// [`None`]: enum.Option.html#variant.None
12511249
#[inline]
12521250
fn from_iter<I: IntoIterator<Item=Option<A>>>(iter: I) -> Option<V> {
12531251
// FIXME(#11084): This could be replaced with Iterator::scan when this

src/libcore/result.rs

+3-9
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ impl<T, E> Result<T, E> {
507507

508508
/// Returns an iterator over the possibly contained value.
509509
///
510-
/// The iterator yields one value if the result is [`Ok`], otherwise none.
510+
/// The iterator yields one value if the result is [`Result::Ok`], otherwise none.
511511
///
512512
/// # Examples
513513
///
@@ -520,8 +520,6 @@ impl<T, E> Result<T, E> {
520520
/// let x: Result<u32, &str> = Err("nothing!");
521521
/// assert_eq!(x.iter().next(), None);
522522
/// ```
523-
///
524-
/// [`Ok`]: enum.Result.html#variant.Ok
525523
#[inline]
526524
#[stable(feature = "rust1", since = "1.0.0")]
527525
pub fn iter(&self) -> Iter<T> {
@@ -530,7 +528,7 @@ impl<T, E> Result<T, E> {
530528

531529
/// Returns a mutable iterator over the possibly contained value.
532530
///
533-
/// The iterator yields one value if the result is [`Ok`], otherwise none.
531+
/// The iterator yields one value if the result is [`Result::Ok`], otherwise none.
534532
///
535533
/// # Examples
536534
///
@@ -547,8 +545,6 @@ impl<T, E> Result<T, E> {
547545
/// let mut x: Result<u32, &str> = Err("nothing!");
548546
/// assert_eq!(x.iter_mut().next(), None);
549547
/// ```
550-
///
551-
/// [`Ok`]: enum.Result.html#variant.Ok
552548
#[inline]
553549
#[stable(feature = "rust1", since = "1.0.0")]
554550
pub fn iter_mut(&mut self) -> IterMut<T> {
@@ -994,7 +990,7 @@ impl<T, E> IntoIterator for Result<T, E> {
994990

995991
/// Returns a consuming iterator over the possibly contained value.
996992
///
997-
/// The iterator yields one value if the result is [`Ok`], otherwise none.
993+
/// The iterator yields one value if the result is [`Result::Ok`], otherwise none.
998994
///
999995
/// # Examples
1000996
///
@@ -1009,8 +1005,6 @@ impl<T, E> IntoIterator for Result<T, E> {
10091005
/// let v: Vec<u32> = x.into_iter().collect();
10101006
/// assert_eq!(v, []);
10111007
/// ```
1012-
///
1013-
/// [`Ok`]: enum.Result.html#variant.Ok
10141008
#[inline]
10151009
fn into_iter(self) -> IntoIter<T> {
10161010
IntoIter { inner: self.ok() }

src/libstd/collections/hash/map.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -2655,9 +2655,8 @@ impl DefaultHasher {
26552655

26562656
#[stable(feature = "hashmap_default_hasher", since = "1.13.0")]
26572657
impl Default for DefaultHasher {
2658-
/// Creates a new `DefaultHasher` using [`new`]. See its documentation for more.
2659-
///
2660-
/// [`new`]: #method.new
2658+
/// Creates a new `DefaultHasher` using [`new`][DefaultHasher::new].
2659+
/// See its documentation for more.
26612660
fn default() -> DefaultHasher {
26622661
DefaultHasher::new()
26632662
}

src/libstd/io/buffered.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -294,17 +294,15 @@ impl<R: Seek> Seek for BufReader<R> {
294294
/// `.into_inner()` immediately after a seek yields the underlying reader
295295
/// at the same position.
296296
///
297-
/// To seek without discarding the internal buffer, use [`seek_relative`].
297+
/// To seek without discarding the internal buffer, use [`Seek::seek_relative`].
298298
///
299-
/// See `std::io::Seek` for more details.
299+
/// See [`std::io::Seek`] for more details.
300300
///
301301
/// Note: In the edge case where you're seeking with `SeekFrom::Current(n)`
302302
/// where `n` minus the internal buffer length overflows an `i64`, two
303303
/// seeks will be performed instead of one. If the second seek returns
304304
/// `Err`, the underlying reader will be left at the same position it would
305305
/// have if you called `seek` with `SeekFrom::Current(0)`.
306-
///
307-
/// [`seek_relative`]: #method.seek_relative
308306
fn seek(&mut self, pos: SeekFrom) -> io::Result<u64> {
309307
let result: u64;
310308
if let SeekFrom::Current(n) = pos {

src/libstd/sync/mutex.rs

-2
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,6 @@ unsafe impl<#[may_dangle] T: ?Sized> Drop for Mutex<T> {
386386
impl<T> From<T> for Mutex<T> {
387387
/// Creates a new mutex in an unlocked state ready for use.
388388
/// This is equivalent to [`Mutex::new`].
389-
///
390-
/// [`Mutex::new`]: #method.new
391389
fn from(t: T) -> Self {
392390
Mutex::new(t)
393391
}

src/libstd/sync/rwlock.rs

-2
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,6 @@ impl<T: Default> Default for RwLock<T> {
461461
impl<T> From<T> for RwLock<T> {
462462
/// Creates a new instance of an `RwLock<T>` which is unlocked.
463463
/// This is equivalent to [`RwLock::new`].
464-
///
465-
/// [`RwLock::new`]: #method.new
466464
fn from(t: T) -> Self {
467465
RwLock::new(t)
468466
}

0 commit comments

Comments
 (0)