Skip to content

Commit dda77e0

Browse files
ehusstshepang
authored andcommitted
Fix some links
1 parent 7fa8c55 commit dda77e0

17 files changed

+28
-28
lines changed

src/bug-fix-procedure.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ self.tcx.sess.add_lint(lint::builtin::OVERLAPPING_INHERENT_IMPLS,
304304
We want to convert this into an error. In some cases, there may be an
305305
existing error for this scenario. In others, we will need to allocate a
306306
fresh diagnostic code. [Instructions for allocating a fresh diagnostic
307-
code can be found here.](./diagnostics/diagnostic-codes.md) You may want
307+
code can be found here.](./diagnostics/error-codes.md) You may want
308308
to mention in the extended description that the compiler behavior
309309
changed on this point, and include a reference to the tracking issue for
310310
the change.

src/building/how-to-build-and-run.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ and `src/tools` directories. So, you can simply run `x.py test tidy` instead of
104104

105105
[rust-analyzer]: suggested.html#configuring-rust-analyzer-for-rustc
106106

107-
See the chapters on [building](how-to-build-and-run),
108-
[testing](../tests/intro), and [rustdoc](../rustdoc) for more details.
107+
See the chapters on
108+
[testing](../tests/running.md) and [rustdoc](../rustdoc.md) for more details.
109109

110110
### Building the compiler
111111

src/building/suggested.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ opened when this file is detected.
7979

8080
If you're running `coc.nvim`, you can use `:CocLocalConfig` to create a
8181
`.vim/coc-settings.json` and copy the settings from
82-
[this file](https://github.com/rust-lang/rust/blob/master/src/etc/vscode_settings.json).
82+
[this file](https://github.com/rust-lang/rust/blob/master/src/etc/rust_analyzer_settings.json).
8383

8484
Another way is without a plugin, and creating your own logic in your configuration. To do this you
8585
must translate the JSON to Lua yourself. The translation is 1:1 and fairly straight-forward. It
@@ -348,4 +348,4 @@ Zsh support will also be included once issues with [`clap_complete`](https://cra
348348
You can use `source ./src/etc/completions/x.py.<extension>`
349349
to load completions for your shell of choice,
350350
or `source .\src\etc\completions\x.py.ps1` for PowerShell.
351-
Adding this to your shell's startup script (e.g. `.bashrc`) will automatically load this completion.
351+
Adding this to your shell's startup script (e.g. `.bashrc`) will automatically load this completion.

src/closure.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,10 @@ Let's start with defining a term that we will be using quite a bit in the rest o
115115
*upvar*. An **upvar** is a variable that is local to the function where the closure is defined. So,
116116
in the above examples, **x** will be an upvar to the closure. They are also sometimes referred to as
117117
the *free variables* meaning they are not bound to the context of the closure.
118-
[`compiler/rustc_middle/src/ty/query/mod.rs`][upvars] defines a query called *upvars_mentioned*
118+
[`compiler/rustc_passes/src/upvars.rs`][upvars] defines a query called *upvars_mentioned*
119119
for this purpose.
120120

121-
[upvars]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_query_impl/queries/struct.upvars_mentioned.html
121+
[upvars]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_passes/upvars/index.html
122122

123123
Other than lazy invocation, one other thing that distinguishes a closure from a
124124
normal function is that it can use the upvars. It borrows these upvars from its surrounding

src/compiler-src.md

-3
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,8 @@ These include:
195195
run a lot of tests on a lot of platforms.
196196
- [`src/doc`]: Various documentation, including submodules for a few books.
197197
- [`src/etc`]: Miscellaneous utilities.
198-
- [`src/tools/rustc-workspace-hack`], and others: Various workarounds to make
199-
cargo work with bootstrapping.
200198
- And more...
201199

202200
[`src/ci`]: https://github.com/rust-lang/rust/tree/master/src/ci
203201
[`src/doc`]: https://github.com/rust-lang/rust/tree/master/src/doc
204202
[`src/etc`]: https://github.com/rust-lang/rust/tree/master/src/etc
205-
[`src/tools/rustc-workspace-hack`]: https://github.com/rust-lang/rust/tree/master/src/tools/rustc-workspace-hack

src/contributing.md

+2
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ below][break]) for some PRs.
181181
[r?]: https://github.com/rust-lang/rust/pull/78133#issuecomment-712692371
182182
[#t-release/triage]: https://rust-lang.zulipchat.com/#narrow/stream/242269-t-release.2Ftriage
183183
[break]: #breaking-changes
184+
[crater]: tests/crater.md
185+
184186
### CI
185187

186188
In addition to being reviewed by a human, pull requests are automatically tested

src/diagnostics/translation.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ information that needs to be provided by the code to do so.
8787

8888
### Compile-time validation and typed identifiers
8989
rustc's Fluent resources for the default locale (`en-US`) are in the
90-
[`compiler/rustc_error_messages/locales/en-US`] directory. Currently, each crate
91-
which defines translatable diagnostics has its own Fluent resource, such as
92-
`parser.ftl` or `typeck.ftl`.
90+
[`compiler/rustc_error_messages/messages.ftl`] file. Currently, each crate
91+
which defines translatable diagnostics has its own Fluent resource in
92+
a file named `messages.ftl`.
9393

9494
rustc's `fluent_messages` macro performs compile-time validation of Fluent
9595
resources and generates code to make it easier to refer to Fluent messages in
@@ -240,5 +240,5 @@ won't fail. Bundle loading can fail if a requested locale is missing, Fluent
240240
files are malformed, or a message is duplicated in multiple resources.
241241

242242
[Fluent]: https://projectfluent.org
243-
[`compiler/rustc_error_messages/locales/en-US`]: https://github.com/rust-lang/rust/tree/master/compiler/rustc_error_messages/locales/en-US
243+
[`compiler/rustc_error_messages/messages.ftl`]: https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_error_messages/messages.ftl
244244
[`rustc_error_messages::DiagnosticMessage`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_error_messages/enum.DiagnosticMessage.html

src/fuzzing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ project, please read this guide before reporting fuzzer-generated bugs!
3636
If you're not sure whether or not an ICE is a duplicate of one that's already
3737
been reported, please go ahead and report it and link to issues you think might
3838
be related. In general, ICEs on the same line but with different *query stacks*
39-
are usually distinct bugs. For example, [#109020][#109202] and [#109129][#109129]
39+
are usually distinct bugs. For example, [#109020][#109020] and [#109129][#109129]
4040
had similar error messages:
4141

4242
```
@@ -146,4 +146,4 @@ ICEs that require debug assertions to reproduce should be tagged
146146
[glacier]: https://github.com/rust-lang/glacier
147147
[fuzz-rustc]: https://github.com/dwrensha/fuzz-rustc
148148
[icemaker]: https://github.com/matthiaskrgr/icemaker/
149-
[tree-splicer]: https://github.com/langston-barrett/tree-splicer/
149+
[tree-splicer]: https://github.com/langston-barrett/tree-splicer/

src/identifiers.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ See the [HIR chapter][hir-map] for more detailed information.
7070
- [`Local`] identifies a local variable in a function. Its associated data is in
7171
[`LocalDecl`], which can be retrieved by indexing into [`Body.local_decls`].
7272

73-
- [`Field`] identifies a struct's, union's, or enum variant's field. It is used
73+
- [`FieldIdx`] identifies a struct's, union's, or enum variant's field. It is used
7474
as a "projection" in [`Place`].
7575

7676
- [`SourceScope`] identifies a name scope in the original source code. Used for
@@ -96,7 +96,7 @@ See the [HIR chapter][hir-map] for more detailed information.
9696
[`Local`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/struct.Local.html
9797
[`LocalDecl`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/struct.LocalDecl.html
9898
[`Body.local_decls`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/struct.Body.html#structfield.local_decls
99-
[`Field`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/struct.Field.html
99+
[`FieldIdx`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_abi/struct.FieldIdx.html
100100
[`Place`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/struct.Place.html
101101
[`SourceScope`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/struct.SourceScope.html
102102
[`SourceScopeData`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/struct.SourceScopeData.html

src/llvm-coverage-instrumentation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ function--[`bcb_from_bb()`][bcb-from-bb]--to look up a `BasicCoverageBlock` from
466466
[graph-traits]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_data_structures/graph/index.html#traits
467467
[mir-dev-guide]: mir/index.md
468468
[compute-basic-coverage-blocks]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/coverage/graph/struct.CoverageGraph.html#method.compute_basic_coverage_blocks
469-
[simplify-cfg]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/simplify/struct.SimplifyCfg.html
469+
[simplify-cfg]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/simplify/enum.SimplifyCfg.html
470470
[rust-lang/rust#78544]: https://github.com/rust-lang/rust/issues/78544
471471
[mir-debugging]: mir/debugging.md
472472
[bcb-from-bb]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/coverage/graph/struct.CoverageGraph.html#method.bcb_from_bb

src/mir/optimizations.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ optimizes it, and returns the improved MIR.
4545
4. Implement a new optimization in [`compiler/rustc_mir_transform/src`].
4646
The fastest and easiest way to do this is to
4747

48-
1. pick a small optimization (such as [`no_landing_pads`]) and copy it
48+
1. pick a small optimization (such as [`remove_storage_markers`]) and copy it
4949
to a new file,
5050
2. add your optimization to one of the lists in the
5151
[`run_optimization_passes()`] function,
@@ -72,8 +72,7 @@ If you have any questions along the way, feel free to ask in
7272

7373
[mir-opt-test-readme]: https://github.com/rust-lang/rust/blob/master/tests/mir-opt/README.md
7474
[`compiler/rustc_mir_transform/src`]: https://github.com/rust-lang/rust/tree/master/compiler/rustc_mir_transform/src
75-
<!--- TODO: Change NoLandingPads. [#1232](https://github.com/rust-lang/rustc-dev-guide/issues/1232) -->
76-
[`no_landing_pads`]: https://github.com/rust-lang/rust/blob/master/compiler/rustc_mir_transform/src/no_landing_pads.rs
75+
[`remove_storage_markers`]: https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_mir_transform/src/remove_storage_markers.rs
7776
[`run_optimization_passes()`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/fn.run_optimization_passes.html
7877

7978
## Defining optimization passes

src/notification-groups/cleanup-crew.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ are a few:
3939

4040
* The [rust-reduce](https://github.com/jethrogb/rust-reduce) tool can try to reduce
4141
code automatically.
42-
* The [C-reduce](https://embed.cs.utah.edu/creduce/) tool also works
42+
* The [C-reduce](https://github.com/csmith-project/creduce) tool also works
4343
on Rust code, though it requires that you start from a single
4444
file. (XXX link to some post explaining how to do it?)
4545
* pnkfelix's [Rust Bug Minimization Patterns] blog post

src/query.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ When the tcx is created, it is given the providers by its creator using
103103
the [`Providers`][providers_struct] struct. This struct is generated by
104104
the macros here, but it is basically a big list of function pointers:
105105

106-
[providers_struct]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/query/struct.Providers.html
106+
[providers_struct]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/query/struct.Providers.html
107107

108108
```rust,ignore
109109
struct Providers {

src/rustc-driver.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ as well as allowing some custom code run after different phases of the compilati
3232
3333

3434
[cb]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_driver/trait.Callbacks.html
35-
[rd_rc]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_driver/fn.run_compiler.html
35+
[rd_rc]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_driver_impl/fn.run_compiler.html
3636
[i_rc]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_interface/interface/fn.run_compiler.html
3737
[example]: https://github.com/rust-lang/rustc-dev-guide/blob/master/examples/rustc-driver-example.rs
3838
[`rustc_interface`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_interface/index.html

src/rustdoc-internals.md

+2
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ running the Markdown parser. There's also a function in here
173173
(`find_testable_code`) that specifically scans for Rust code blocks so the
174174
test-runner code can find all the doctests in the crate.
175175

176+
[Askama]: https://docs.rs/askama/latest/askama/
177+
176178
### From soup to nuts
177179

178180
(alternate title: ["An unbroken thread that stretches from those first `Cell`s

src/solve/trait-solving.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ Two types being equal in the type system must mean that they have the same `Type
111111

112112

113113
[solve]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_trait_selection/solve/index.html
114-
[`Goal`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_trait_selection/solve/struct.Goal.html
114+
[`Goal`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_trait_selection/traits/solve/struct.Goal.html
115115
[`Predicate`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.Predicate.html
116116
[`Candidate`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_trait_selection/solve/assembly/struct.Candidate.html
117117
[`CandidateSource`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_trait_selection/solve/assembly/enum.CandidateSource.html
118-
[`CanonicalResponse`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_trait_selection/solve/type.CanonicalResponse.html
118+
[`CanonicalResponse`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_trait_selection/traits/solve/type.CanonicalResponse.html

src/tests/compiletest.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ There is a [`tools.mk`] Makefile which you can include which provides a bunch of
380380
utilities to make it easier to run commands and compare outputs.
381381
Take a look at some of the other tests for some examples on how to get started.
382382

383-
[`tools.mk`]: https://github.com/rust-lang/rust/blob/master/tests/run-make-fulldeps/tools.mk
383+
[`tools.mk`]: https://github.com/rust-lang/rust/blob/master/tests/run-make/tools.mk
384384
[`tests/run-make`]: https://github.com/rust-lang/rust/tree/master/tests/run-make
385385

386386

0 commit comments

Comments
 (0)