Skip to content

Commit b47a442

Browse files
committed
Auto merge of #34034 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 7 pull requests - Successful merges: #33993, #34013, #34014, #34015, #34019, #34021, #34033 - Failed merges:
2 parents 270bd7c + 7399403 commit b47a442

28 files changed

+344
-17
lines changed

src/doc/book/choosing-your-guarantees.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ indicator (one word in size) along with the data.
232232

233233
At runtime each borrow causes a modification/check of the refcount.
234234

235-
[cell-mod]: ../std/cell/
235+
[cell-mod]: ../std/cell/index.html
236236
[cell]: ../std/cell/struct.Cell.html
237237
[refcell]: ../std/cell/struct.RefCell.html
238238

src/doc/book/documentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ This [unfortunate error](https://github.com/rust-lang/rust/issues/22547) is
7676
correct; documentation comments apply to the thing after them, and there's
7777
nothing after that last comment.
7878

79-
[rc-new]: https://doc.rust-lang.org/nightly/std/rc/struct.Rc.html#method.new
79+
[rc-new]: ../std/rc/struct.Rc.html#method.new
8080

8181
### Writing documentation comments
8282

src/doc/book/error-handling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2205,7 +2205,7 @@ heuristics!
22052205
[3]: ../std/option/enum.Option.html#method.unwrap_or
22062206
[4]: ../std/option/enum.Option.html#method.unwrap_or_else
22072207
[5]: ../std/option/enum.Option.html
2208-
[6]: ../std/result/
2208+
[6]: ../std/result/index.html
22092209
[7]: ../std/result/enum.Result.html#method.unwrap
22102210
[8]: ../std/fmt/trait.Debug.html
22112211
[9]: ../std/primitive.str.html#method.parse

src/doc/book/using-rust-without-the-standard-library.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ fn plus_one(x: i32) -> i32 {
2222
```
2323

2424
Much of the functionality that’s exposed in the standard library is also
25-
available via the [`core` crate](../core/). When we’re using the standard
26-
library, Rust automatically brings `std` into scope, allowing you to use
27-
its features without an explicit import. By the same token, when using
25+
available via the [`core` crate](../core/index.html). When we’re using the
26+
standard library, Rust automatically brings `std` into scope, allowing you to
27+
use its features without an explicit import. By the same token, when using
2828
`#![no_std]`, Rust will bring `core` into scope for you, as well as [its
29-
prelude](../core/prelude/v1/). This means that a lot of code will Just Work:
29+
prelude](../core/prelude/v1/index.html). This means that a lot of code will Just
30+
Work:
3031

3132
```rust
3233
#![no_std]

src/doc/book/vectors.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,5 +152,5 @@ API documentation][vec].
152152
[box]: ../std/boxed/index.html
153153
[generic]: generics.html
154154
[panic]: concurrency.html#panics
155-
[get]: http://doc.rust-lang.org/std/vec/struct.Vec.html#method.get
156-
[get_mut]: http://doc.rust-lang.org/std/vec/struct.Vec.html#method.get_mut
155+
[get]: ../std/vec/struct.Vec.html#method.get
156+
[get_mut]: ../std/vec/struct.Vec.html#method.get_mut

src/doc/nomicon/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ exception-safety, pointer aliasing, memory models, and even some type-theory.
3535
We will also be spending a lot of time talking about the different kinds
3636
of safety and guarantees.
3737

38-
[trpl]: ../book/
38+
[trpl]: ../book/index.html

src/librustc_const_eval/diagnostics.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,18 +384,19 @@ let irr = Irrefutable(0);
384384
385385
// This fails to compile because the match is irrefutable.
386386
while let Irrefutable(x) = irr {
387-
...
387+
// ...
388388
}
389+
```
389390
390391
Try this instead:
391392
392-
```
393+
```no_run
393394
struct Irrefutable(i32);
394395
let irr = Irrefutable(0);
395396
396397
loop {
397398
let Irrefutable(x) = irr;
398-
...
399+
// ...
399400
}
400401
```
401402
"##,

src/librustc_typeck/diagnostics.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2040,6 +2040,7 @@ impl Foo for Bar {
20402040
// the trait
20412041
fn foo(&self) {}
20422042
}
2043+
```
20432044
"##,
20442045

20452046
E0186: r##"

src/libstd/fs.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ use time::SystemTime;
3232
/// it was opened with. Files also implement `Seek` to alter the logical cursor
3333
/// that the file contains internally.
3434
///
35+
/// Files are automatically closed when they go out of scope.
36+
///
3537
/// # Examples
3638
///
3739
/// ```no_run
@@ -1341,8 +1343,9 @@ pub fn remove_dir_all<P: AsRef<Path>>(path: P) -> io::Result<()> {
13411343
/// if dir.is_dir() {
13421344
/// for entry in try!(fs::read_dir(dir)) {
13431345
/// let entry = try!(entry);
1344-
/// if try!(entry.file_type()).is_dir() {
1345-
/// try!(visit_dirs(&entry.path(), cb));
1346+
/// let path = entry.path();
1347+
/// if path.is_dir() {
1348+
/// try!(visit_dirs(&path, cb));
13461349
/// } else {
13471350
/// cb(&entry);
13481351
/// }

src/libstd/primitive_docs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
/// ```
2929
///
3030
/// [`assert!`]: macro.assert!.html
31-
/// [`if` conditionals]: ../book/if.html
31+
/// [`if`]: ../book/if.html
3232
/// [`BitAnd`]: ops/trait.BitAnd.html
3333
/// [`BitOr`]: ops/trait.BitOr.html
3434
/// [`Not`]: ops/trait.Not.html

0 commit comments

Comments
 (0)