Skip to content

Commit 97eda01

Browse files
committed
Auto merge of rust-lang#70034 - Dylan-DPC:rollup-5yg771j, r=Dylan-DPC
Rollup of 8 pull requests Successful merges: - rust-lang#69686 (Use `pprust` to print attributes in rustdoc) - rust-lang#69858 (std: on Windows, use GetSystemTimePreciseAsFileTime if it is available) - rust-lang#69917 (Cleanup E0412 and E0422) - rust-lang#69964 (Add Node.js to PR CI image) - rust-lang#69992 (Block version-specific docs from search engines) - rust-lang#69995 (Add more context to the literal overflow message) - rust-lang#69998 (Add long error explanation for E0634) - rust-lang#70014 (Small fixes in rustdoc book) Failed merges: r? @ghost
2 parents 45ebd58 + 6b50a4c commit 97eda01

30 files changed

+177
-86
lines changed

src/bootstrap/test.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,6 @@ impl Step for RustdocTheme {
607607

608608
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
609609
pub struct RustdocJSStd {
610-
pub host: Interned<String>,
611610
pub target: Interned<String>,
612611
}
613612

@@ -621,13 +620,16 @@ impl Step for RustdocJSStd {
621620
}
622621

623622
fn make_run(run: RunConfig<'_>) {
624-
run.builder.ensure(RustdocJSStd { host: run.host, target: run.target });
623+
run.builder.ensure(RustdocJSStd { target: run.target });
625624
}
626625

627626
fn run(self, builder: &Builder<'_>) {
628627
if let Some(ref nodejs) = builder.config.nodejs {
629628
let mut command = Command::new(nodejs);
630-
command.args(&["src/tools/rustdoc-js-std/tester.js", &*self.host]);
629+
command
630+
.arg(builder.src.join("src/tools/rustdoc-js-std/tester.js"))
631+
.arg(builder.doc_out(self.target))
632+
.arg(builder.src.join("src/test/rustdoc-js-std"));
631633
builder.ensure(crate::doc::Std { target: self.target, stage: builder.top_stage });
632634
builder.run(&mut command);
633635
} else {

src/ci/docker/x86_64-gnu-llvm-7/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1616
libssl-dev \
1717
pkg-config \
1818
zlib1g-dev \
19-
xz-utils
19+
xz-utils \
20+
nodejs
2021

2122
COPY scripts/sccache.sh /scripts/
2223
RUN sh /scripts/sccache.sh

src/doc/robots.txt

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
11
User-agent: *
2-
Disallow: /0.3/
3-
Disallow: /0.4/
4-
Disallow: /0.5/
5-
Disallow: /0.6/
6-
Disallow: /0.7/
7-
Disallow: /0.8/
8-
Disallow: /0.9/
9-
Disallow: /0.10/
10-
Disallow: /0.11.0/
11-
Disallow: /0.12.0/
12-
Disallow: /1.0.0-alpha/
13-
Disallow: /1.0.0-alpha.2/
14-
Disallow: /1.0.0-beta/
15-
Disallow: /1.0.0-beta.2/
16-
Disallow: /1.0.0-beta.3/
17-
Disallow: /1.0.0-beta.4/
18-
Disallow: /1.0.0-beta.5/
2+
Disallow: /1.
3+
Disallow: /0.
194
Disallow: /book/first-edition/
205
Disallow: /book/second-edition/
216
Disallow: /stable/book/first-edition/

src/doc/rustdoc/src/advanced-features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The features listed on this page fall outside the rest of the main categories.
44

55
## `#[cfg(doc)]`: Documenting platform-/feature-specific information
66

7-
For conditional compilation, Rustdoc treats your crate the same way the compiler does: Only things
7+
For conditional compilation, Rustdoc treats your crate the same way the compiler does. Only things
88
from the host target are available (or from the given `--target` if present), and everything else is
99
"filtered out" from the crate. This can cause problems if your crate is providing different things
1010
on different targets and you want your documentation to reflect all the available items you

src/doc/rustdoc/src/command-line-arguments.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ Rustdoc only supports HTML output, and so this flag is redundant today.
7979
Using this flag looks like this:
8080

8181
```bash
82-
$ rustdoc src/lib.rs -o target\\doc
83-
$ rustdoc src/lib.rs --output target\\doc
82+
$ rustdoc src/lib.rs -o target/doc
83+
$ rustdoc src/lib.rs --output target/doc
8484
```
8585

8686
By default, `rustdoc`'s output appears in a directory named `doc` in

src/doc/rustdoc/src/documentation-tests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ only shows the part you care about.
314314
`should_panic` tells `rustdoc` that the code should compile correctly, but
315315
not actually pass as a test.
316316

317-
```text
317+
```rust
318318
/// ```no_run
319319
/// loop {
320320
/// println!("Hello, world");

src/doc/rustdoc/src/what-is-rustdoc.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ $ cargo doc
7878
Internally, this calls out to `rustdoc` like this:
7979

8080
```bash
81-
$ rustdoc --crate-name docs srclib.rs -o <path>\docs\target\doc -L
82-
dependency=<path>docs\target\debug\deps
81+
$ rustdoc --crate-name docs src/lib.rs -o <path>/docs/target/doc -L
82+
dependency=<path>/docs/target/debug/deps
8383
```
8484

8585
You can see this with `cargo doc --verbose`.
@@ -128,4 +128,4 @@ Cargo currently does not understand standalone Markdown files, unfortunately.
128128
## Summary
129129

130130
This covers the simplest use-cases of `rustdoc`. The rest of this book will
131-
explain all of the options that `rustdoc` has, and how to use them.
131+
explain all of the options that `rustdoc` has, and how to use them.

src/librustc_error_codes/error_codes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ E0626: include_str!("./error_codes/E0626.md"),
351351
E0627: include_str!("./error_codes/E0627.md"),
352352
E0631: include_str!("./error_codes/E0631.md"),
353353
E0633: include_str!("./error_codes/E0633.md"),
354+
E0634: include_str!("./error_codes/E0634.md"),
354355
E0635: include_str!("./error_codes/E0635.md"),
355356
E0636: include_str!("./error_codes/E0636.md"),
356357
E0637: include_str!("./error_codes/E0637.md"),
@@ -589,7 +590,6 @@ E0748: include_str!("./error_codes/E0748.md"),
589590
E0630,
590591
E0632, // cannot provide explicit generic arguments when `impl Trait` is
591592
// used in argument position
592-
E0634, // type has conflicting packed representaton hints
593593
E0640, // infer outlives requirements
594594
// E0645, // trait aliases not finished
595595
E0657, // `impl Trait` can only capture lifetimes bound at the fn level

src/librustc_error_codes/error_codes/E0412.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
The type name used is not in scope.
1+
A used type name is not in scope.
22

33
Erroneous code examples:
44

src/librustc_error_codes/error_codes/E0422.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
You are trying to use an identifier that is either undefined or not a struct.
1+
An identifier that is neither defined nor a struct was used.
2+
23
Erroneous code example:
34

45
```compile_fail,E0422

0 commit comments

Comments
 (0)