Skip to content

Commit 01cbdf4

Browse files
committedJan 13, 2016
Fix some broken and missing links in the docs
1 parent d3c83fe commit 01cbdf4

File tree

6 files changed

+27
-24
lines changed

6 files changed

+27
-24
lines changed
 

‎src/libcollections/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
//! Collection types.
1212
//!
13-
//! See [std::collections](../std/collections) for a detailed discussion of
13+
//! See [std::collections](../std/collections/index.html) for a detailed discussion of
1414
//! collections in Rust.
1515
1616
#![crate_name = "collections"]

‎src/libcollections/str.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1384,7 +1384,7 @@ impl str {
13841384
///
13851385
/// For iterating from the front, the [`matches()`] method can be used.
13861386
///
1387-
/// [`matches`]: #method.matches
1387+
/// [`matches()`]: #method.matches
13881388
///
13891389
/// # Examples
13901390
///

‎src/libcollections/string.rs

+7-4
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ use boxed::Box;
6262
/// hello.push_str("orld!");
6363
/// ```
6464
///
65+
/// [`char`]: ../primitive.char.html
6566
/// [`push()`]: #method.push
6667
/// [`push_str()`]: #method.push_str
6768
///
@@ -163,8 +164,8 @@ use boxed::Box;
163164
/// ```
164165
///
165166
/// [`as_ptr()`]: #method.as_ptr
166-
/// [`len()`]: # method.len
167-
/// [`capacity()`]: # method.capacity
167+
/// [`len()`]: #method.len
168+
/// [`capacity()`]: #method.capacity
168169
///
169170
/// If a `String` has enough capacity, adding elements to it will not
170171
/// re-allocate. For example, consider this program:
@@ -444,15 +445,15 @@ impl String {
444445
/// Converts a slice of bytes to a `String`, including invalid characters.
445446
///
446447
/// A string slice ([`&str`]) is made of bytes ([`u8`]), and a slice of
447-
/// bytes ([`&[u8]`]) is made of bytes, so this function converts between
448+
/// bytes ([`&[u8]`][byteslice]) is made of bytes, so this function converts between
448449
/// the two. Not all byte slices are valid string slices, however: [`&str`]
449450
/// requires that it is valid UTF-8. During this conversion,
450451
/// `from_utf8_lossy()` will replace any invalid UTF-8 sequences with
451452
/// `U+FFFD REPLACEMENT CHARACTER`, which looks like this: �
452453
///
453454
/// [`&str`]: ../primitive.str.html
454455
/// [`u8`]: ../primitive.u8.html
455-
/// [`&[u8]`]: ../primitive.slice.html
456+
/// [byteslice]: ../primitive.slice.html
456457
///
457458
/// If you are sure that the byte slice is valid UTF-8, and you don't want
458459
/// to incur the overhead of the conversion, there is an unsafe version
@@ -1311,6 +1312,8 @@ impl FromUtf8Error {
13111312
///
13121313
/// [`Utf8Error`]: ../str/struct.Utf8Error.html
13131314
/// [`std::str`]: ../str/index.html
1315+
/// [`u8`]: ../primitive.u8.html
1316+
/// [`&str`]: ../primitive.str.html
13141317
///
13151318
/// # Examples
13161319
///

‎src/libcore/iter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1358,7 +1358,7 @@ pub trait Iterator {
13581358
/// One of the keys to `collect()`'s power is that many things you might
13591359
/// not think of as 'collections' actually are. For example, a [`String`]
13601360
/// is a collection of [`char`]s. And a collection of [`Result<T, E>`] can
1361-
/// be thought of as single [`Result<Collection<T>, E>`]. See the examples
1361+
/// be thought of as single `Result<Collection<T>, E>`. See the examples
13621362
/// below for more.
13631363
///
13641364
/// [`String`]: ../string/struct.String.html

‎src/librustc_unicode/char.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ pub use tables::UNICODE_VERSION;
4646
/// This `struct` is created by the [`to_lowercase()`] method on [`char`]. See
4747
/// its documentation for more.
4848
///
49-
/// [`to_lowercase()`]: primitive.char.html#method.escape_to_lowercase
50-
/// [`char`]: primitive.char.html
49+
/// [`to_lowercase()`]: ../primitive.char.html#method.to_lowercase
50+
/// [`char`]: ../primitive.char.html
5151
#[stable(feature = "rust1", since = "1.0.0")]
5252
pub struct ToLowercase(CaseMappingIter);
5353

@@ -64,8 +64,8 @@ impl Iterator for ToLowercase {
6464
/// This `struct` is created by the [`to_uppercase()`] method on [`char`]. See
6565
/// its documentation for more.
6666
///
67-
/// [`to_uppercase()`]: primitive.char.html#method.escape_to_uppercase
68-
/// [`char`]: primitive.char.html
67+
/// [`to_uppercase()`]: ../primitive.char.html#method.to_uppercase
68+
/// [`char`]: ../primitive.char.html
6969
#[stable(feature = "rust1", since = "1.0.0")]
7070
pub struct ToUppercase(CaseMappingIter);
7171

‎src/libstd/io/mod.rs

+13-13
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
//! ```
113113
//!
114114
//! `BufWriter` doesn't add any new ways of writing; it just buffers every call
115-
//! to [`write()`][write]:
115+
//! to [`write()`][write()]:
116116
//!
117117
//! ```
118118
//! use std::io;
@@ -134,7 +134,7 @@
134134
//! # }
135135
//! ```
136136
//!
137-
//! [write]: trait.Write.html#tymethod.write
137+
//! [write()]: trait.Write.html#tymethod.write
138138
//!
139139
//! ## Standard input and output
140140
//!
@@ -399,7 +399,7 @@ fn read_to_end<R: Read + ?Sized>(r: &mut R, buf: &mut Vec<u8>) -> Result<usize>
399399
///
400400
/// [`File`][file]s implement `Read`:
401401
///
402-
/// [file]: ../std/fs/struct.File.html
402+
/// [file]: ../fs/struct.File.html
403403
///
404404
/// ```
405405
/// use std::io;
@@ -459,7 +459,7 @@ pub trait Read {
459459
///
460460
/// [`File`][file]s implement `Read`:
461461
///
462-
/// [file]: ../std/fs/struct.File.html
462+
/// [file]: ../fs/struct.File.html
463463
///
464464
/// ```
465465
/// use std::io;
@@ -501,7 +501,7 @@ pub trait Read {
501501
///
502502
/// [`File`][file]s implement `Read`:
503503
///
504-
/// [file]: ../std/fs/struct.File.html
504+
/// [file]: ../fs/struct.File.html
505505
///
506506
/// ```
507507
/// use std::io;
@@ -540,7 +540,7 @@ pub trait Read {
540540
///
541541
/// [`File`][file]s implement `Read`:
542542
///
543-
/// [file]: ../std/fs/struct.File.html
543+
/// [file]: ../fs/struct.File.html
544544
///
545545
/// ```
546546
/// use std::io;
@@ -600,7 +600,7 @@ pub trait Read {
600600
///
601601
/// [`File`][file]s implement `Read`:
602602
///
603-
/// [file]: ../std/fs/struct.File.html
603+
/// [file]: ../fs/struct.File.html
604604
///
605605
/// ```
606606
/// use std::io;
@@ -643,7 +643,7 @@ pub trait Read {
643643
///
644644
/// [`File`][file]s implement `Read`:
645645
///
646-
/// [file]: ../std/fs/struct.File.html
646+
/// [file]: ../fs/struct.File.html
647647
///
648648
/// ```
649649
/// use std::io;
@@ -682,7 +682,7 @@ pub trait Read {
682682
///
683683
/// [`File`][file]s implement `Read`:
684684
///
685-
/// [file]: ../std/fs/struct.File.html
685+
/// [file]: ../fs/struct.File.html
686686
///
687687
/// ```
688688
/// use std::io;
@@ -718,7 +718,7 @@ pub trait Read {
718718
///
719719
/// [`File`][file]s implement `Read`:
720720
///
721-
/// [file]: ../std/fs/struct.File.html
721+
/// [file]: ../fs/struct.File.html
722722
///
723723
/// ```
724724
/// #![feature(io)]
@@ -753,7 +753,7 @@ pub trait Read {
753753
///
754754
/// [`File`][file]s implement `Read`:
755755
///
756-
/// [file]: ../std/fs/struct.File.html
756+
/// [file]: ../fs/struct.File.html
757757
///
758758
/// ```
759759
/// use std::io;
@@ -789,7 +789,7 @@ pub trait Read {
789789
///
790790
/// [`File`][file]s implement `Read`:
791791
///
792-
/// [file]: ../std/fs/struct.File.html
792+
/// [file]: ../fs/struct.File.html
793793
///
794794
/// ```
795795
/// use std::io;
@@ -823,7 +823,7 @@ pub trait Read {
823823
///
824824
/// [`File`][file]s implement `Read`:
825825
///
826-
/// [file]: ../std/fs/struct.File.html
826+
/// [file]: ../fs/struct.File.html
827827
///
828828
/// ```
829829
/// #![feature(io)]

0 commit comments

Comments
 (0)
Please sign in to comment.