Skip to content

Commit 1f54e14

Browse files
authored
Rollup merge of #141269 - tshepang:rdg-push, r=jieyouxu
rustc-dev-guide subtree update r? `@ghost`
2 parents 5364668 + 86662dc commit 1f54e14

File tree

6 files changed

+20
-27
lines changed

6 files changed

+20
-27
lines changed

src/doc/rustc-dev-guide/rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
414482f6a0d4e7290f614300581a0b55442552a3
1+
e42bbfe1f7c26f8760a99c4b1f27d33aba1040bb

src/doc/rustc-dev-guide/src/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@
134134

135135
- [Command-line arguments](./cli.md)
136136
- [rustc_driver and rustc_interface](./rustc-driver/intro.md)
137+
- [Remarks on perma-unstable features](./rustc-driver/remarks-on-perma-unstable-features.md)
137138
- [Example: Type checking](./rustc-driver/interacting-with-the-ast.md)
138139
- [Example: Getting diagnostics](./rustc-driver/getting-diagnostics.md)
139-
- [Remarks on perma-unstable features](./rustc-driver/remarks-on-perma-unstable-features.md)
140140
- [Errors and lints](diagnostics.md)
141141
- [Diagnostic and subdiagnostic structs](./diagnostics/diagnostic-structs.md)
142142
- [Translation](./diagnostics/translation.md)

src/doc/rustc-dev-guide/src/backend/libs-and-metadata.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ format is specific to `rustc`, and may change over time. This file contains:
2828
[`-C embed-bitcode=no`][embed-bitcode] CLI option to improve compile times
2929
and reduce disk space if LTO is not needed.
3030
* `rustc` [metadata], in a file named `lib.rmeta`.
31-
* A symbol table, which is generally a list of symbols with offsets to the
32-
object file that contain that symbol. This is pretty standard for archive
31+
* A symbol table, which is essentially a list of symbols with offsets to the
32+
object files that contain that symbol. This is pretty standard for archive
3333
files.
3434

3535
[archive file]: https://en.wikipedia.org/wiki/Ar_(Unix)
@@ -46,12 +46,11 @@ A `dylib` is a platform-specific shared library. It includes the `rustc`
4646

4747
### rmeta
4848

49-
An `rmeta` file is custom binary format that contains the [metadata] for the
50-
crate. This file can be used for fast "checks" of a project by skipping all
51-
code generation (as is done with `cargo check`), collecting enough information
52-
for documentation (as is done with `cargo doc`), or for
53-
[pipelining](#pipelining). This file is created if the
54-
[`--emit=metadata`][emit] CLI option is used.
49+
An `rmeta` file is a custom binary format that contains the [metadata] for the
50+
crate. This file can be used for fast "checks" of a project by skipping all code
51+
generation (as is done with `cargo check`), collecting enough information for
52+
documentation (as is done with `cargo doc`), or for [pipelining](#pipelining).
53+
This file is created if the [`--emit=metadata`][emit] CLI option is used.
5554

5655
`rmeta` files do not support linking, since they do not contain compiled
5756
object files.
@@ -60,8 +59,8 @@ object files.
6059

6160
## Metadata
6261

63-
The metadata contains a wide swath of different elements. This guide will not
64-
go into detail of every field it contains. You are encouraged to browse the
62+
The metadata contains a wide swath of different elements. This guide will not go
63+
into detail about every field it contains. You are encouraged to browse the
6564
[`CrateRoot`] definition to get a sense of the different elements it contains.
6665
Everything about metadata encoding and decoding is in the [`rustc_metadata`]
6766
package.
@@ -122,9 +121,9 @@ much more.
122121

123122
By default, all Rust symbols are mangled and incorporate the stable crate id.
124123
This allows multiple versions of the same crate to be included together. Cargo
125-
automatically generates `-C metadata` hashes based on a variety of factors,
126-
like the package version, source, and the target kind (a lib and test can have
127-
the same crate name, so they need to be disambiguated).
124+
automatically generates `-C metadata` hashes based on a variety of factors, like
125+
the package version, source, and target kind (a lib and test can have the same
126+
crate name, so they need to be disambiguated).
128127

129128
[`StableCrateId`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_span/def_id/struct.StableCrateId.html
130129
[`StableCrateId::new`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_span/def_id/struct.StableCrateId.html#method.new
@@ -154,7 +153,7 @@ will also look at the [sysroot] to find dependencies.
154153

155154
As crates are loaded, they are kept in the [`CStore`] with the crate metadata
156155
wrapped in the [`CrateMetadata`] struct. After resolution and expansion, the
157-
`CStore` will make its way into the [`GlobalCtxt`] for the rest of
156+
`CStore` will make its way into the [`GlobalCtxt`] for the rest of the
158157
compilation.
159158

160159
[name resolution]: ../name-resolution.md

src/doc/rustc-dev-guide/src/cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ adding a new command-line argument.
2828
unstable-options` flag.
2929

3030
[cli-docs]: https://doc.rust-lang.org/rustc/command-line-arguments.html
31-
[forge guide for new options]: https://forge.rust-lang.org/compiler/new_option.html
31+
[forge guide for new options]: https://forge.rust-lang.org/compiler/proposals-and-stabilization.html#compiler-flags
3232
[unstable book]: https://doc.rust-lang.org/nightly/unstable-book/
3333
[`parse_bool`]: https://github.com/rust-lang/rust/blob/e5335592e78354e33d798d20c04bcd677c1df62d/src/librustc_session/options.rs#L307-L313

src/doc/rustc-dev-guide/src/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ filtering the search to areas you're interested in. For example:
8989
Not all important or beginner work has issue labels.
9090
See below for how to find work that isn't labelled.
9191

92-
[help-wanted-search]: https://github.com/issues?q=is%3Aopen+is%3Aissue+org%3Arust-lang+no%3Aassignee+label%3AE-easy%2C%22good+first+issue%22%2Cgood-first-issue%2CE-medium%2CEasy%2CE-help-wanted%2CE-mentor+-label%3AS-blocked+
92+
[help-wanted-search]: https://github.com/issues?q=is%3Aopen+is%3Aissue+org%3Arust-lang+no%3Aassignee+label%3AE-easy%2C%22good+first+issue%22%2Cgood-first-issue%2CE-medium%2CEasy%2CE-help-wanted%2CE-mentor+-label%3AS-blocked+-linked:pr+
9393
[Triage]: ./contributing.md#issue-triage
9494

9595
### Recurring work

src/doc/rustc-dev-guide/src/rustc-driver/intro.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ It acts as the glue for running the various phases of the compiler in the correc
77
using the interface defined in the [`rustc_interface`] crate. Where possible, using [`rustc_driver`] rather than [`rustc_interface`] is recommended.
88

99
The main entry point of [`rustc_driver`] is [`rustc_driver::run_compiler`][rd_rc].
10-
This builder accepts the same command-line args as rustc as well as an implementation of [`Callbacks`][cb] and a couple of other optional options.
11-
[`Callbacks`][cb] is a `trait` that allows for custom compiler configuration,
10+
This builder accepts the same command-line args as rustc as well as an implementation of [`Callbacks`] and a couple of other optional options.
11+
[`Callbacks`] is a `trait` that allows for custom compiler configuration,
1212
as well as allowing custom code to run after different phases of the compilation.
1313

1414
## `rustc_interface`
@@ -33,14 +33,8 @@ specifically [`rustc_driver_impl::run_compiler`][rdi_rc]
3333
[`Compiler`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_interface/interface/struct.Compiler.html
3434
[`rustc_driver`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_driver/
3535
[`rustc_interface`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_interface/index.html
36-
[`Session`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_session/struct.Session.html
37-
[`SourceMap`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_span/source_map/struct.SourceMap.html
38-
[`TyCtxt`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.TyCtxt.html
39-
[Appendix A]: appendix/stupid-stats.html
40-
[cb]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_driver/trait.Callbacks.html
36+
[`Callbacks`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_driver/trait.Callbacks.html
4137
[example]: https://github.com/rust-lang/rustc-dev-guide/blob/master/examples/rustc-interface-example.rs
4238
[i_rc]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_interface/interface/fn.run_compiler.html
4339
[rd_rc]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_driver/fn.run_compiler.html
4440
[rdi_rc]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_driver_impl/fn.run_compiler.html
45-
[stupid-stats]: https://github.com/nrc/stupid-stats
46-
[`nightly-rustc`]: https://doc.rust-lang.org/nightly/nightly-rustc/

0 commit comments

Comments
 (0)