Skip to content

Commit ade9352

Browse files
committed
use relative links
Used the following command, followed by some manual tweaking: sd 'https://rustc-dev-guide.rust-lang.org/(.+).html' '$1.md' (fd)
1 parent 56eb8b6 commit ade9352

7 files changed

+43
-43
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ If you set `download-ci-llvm = true`, in some circumstances, such as when
6666
updating the version of LLVM used by `rustc`, you may want to temporarily
6767
disable this feature. See the ["Updating LLVM" section] for more.
6868

69-
["Updating LLVM" section]: https://rustc-dev-guide.rust-lang.org/backend/updating-llvm.html?highlight=download-ci-llvm#feature-updates
69+
["Updating LLVM" section]: /backend/updating-llvm.md#feature-updates
7070

7171
If you have already built `rustc` and you change settings related to LLVM, then you may have to
7272
execute `rm -rf build` for subsequent configuration changes to take effect. Note that `./x.py

src/contributing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ are:
583583
page!
584584
* Don't be afraid to ask! The Rust community is friendly and helpful.
585585

586-
[rustc dev guide]: https://rustc-dev-guide.rust-lang.org/about-this-guide.html
586+
[rustc dev guide]: about-this-guide.md
587587
[gdfrustc]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/
588588
[gsearchdocs]: https://www.google.com/search?q=site:doc.rust-lang.org+your+query+here
589589
[stddocs]: https://doc.rust-lang.org/std
@@ -592,5 +592,5 @@ are:
592592
[rustforge]: https://forge.rust-lang.org/
593593
[tlgba]: https://tomlee.co/2014/04/a-more-detailed-tour-of-the-rust-compiler/
594594
[ro]: https://www.rustaceans.org/
595-
[rctd]: https://rustc-dev-guide.rust-lang.org/tests/intro.html
595+
[rctd]: tests/intro.md
596596
[cheatsheet]: https://bors.rust-lang.org/

src/implementing_new_features.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ for stabilization in a checklist, e.g.,
105105
106106
- [ ] Implement the RFC. (CC @rust-lang/compiler -- can anyone write
107107
up mentoring instructions?)
108-
- [ ] Adjust the documentation. ([See instructions on rustc-dev-guide.](https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#documentation-prs))
109-
- [ ] Stabilize the feature. ([See instructions on rustc-dev-guide.](https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#stabilization-pr))
108+
- [ ] Adjust the documentation. ([See instructions on rustc-dev-guide.](stabilization_guide.md#documentation-prs))
109+
- [ ] Stabilize the feature. ([See instructions on rustc-dev-guide.](stabilization_guide.md#stabilization-pr))
110110
```
111111

112112
## Stability in code

src/macro-expansion.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ iteration, this represents a compile error. Here is the [algorithm][original]:
8888
0. Put the macro back in the queue
8989
1. Continue to next iteration...
9090

91-
[defpath]: https://rustc-dev-guide.rust-lang.org/hir.html?highlight=def,path#identifiers-in-the-hir
91+
[defpath]: hir.md#identifiers-in-the-hir
9292
[`NodeId`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_ast/node_id/struct.NodeId.html
9393
[`InvocationCollector`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_expand/expand/struct.InvocationCollector.html
9494
[`DefId`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/def_id/struct.DefId.html

src/mir/optimizations.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ to do, so compilation is faster. Note that since MIR is generic (not
88
effective; we can optimize the generic version, so all of the monomorphizations
99
are cheaper!
1010

11-
[mir]: https://rustc-dev-guide.rust-lang.org/mir/index.html
12-
[monomorph]: https://rustc-dev-guide.rust-lang.org/appendix/glossary.html#mono
11+
[mir]: /mir/index.md
12+
[monomorph]: /appendix/glossary.md#mono
1313

1414
MIR optimizations run after borrow checking. We run a series of optimization
1515
passes over the MIR to improve it. Some passes are required to run on all code,
@@ -22,9 +22,9 @@ run and that some validation has occurred. Then, it [steals][steal] the MIR,
2222
optimizes it, and returns the improved MIR.
2323

2424
[optmir]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/fn.optimized_mir.html
25-
[query]: https://rustc-dev-guide.rust-lang.org/query.html
26-
[defid]: https://rustc-dev-guide.rust-lang.org/appendix/glossary.html#def-id
27-
[steal]: https://rustc-dev-guide.rust-lang.org/mir/passes.html?highlight=steal#stealing
25+
[query]: /query.md
26+
[defid]: /appendix/glossary.md#def-id
27+
[steal]: /mir/passes.md#stealing
2828

2929
## Quickstart for adding a new optimization
3030

src/overview.md

+25-25
Original file line numberDiff line numberDiff line change
@@ -136,21 +136,21 @@ binary.
136136

137137
[String interning]: https://en.wikipedia.org/wiki/String_interning
138138
[`rustc_lexer`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lexer/index.html
139-
[`rustc_driver`]: https://rustc-dev-guide.rust-lang.org/rustc-driver.html
139+
[`rustc_driver`]: rustc-driver.md
140140
[`rustc_interface::Config`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_interface/interface/struct.Config.html
141-
[lex]: https://rustc-dev-guide.rust-lang.org/the-parser.html
141+
[lex]: the-parser.md
142142
[`StringReader`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_parse/lexer/struct.StringReader.html
143143
[`rustc_parse`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_parse/index.html
144144
[parser]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_parse/index.html
145145
[hir]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/index.html
146-
[*type inference*]: https://rustc-dev-guide.rust-lang.org/type-inference.html
147-
[*trait solving*]: https://rustc-dev-guide.rust-lang.org/traits/resolution.html
148-
[*type checking*]: https://rustc-dev-guide.rust-lang.org/type-checking.html
149-
[mir]: https://rustc-dev-guide.rust-lang.org/mir/index.html
150-
[borrow checking]: https://rustc-dev-guide.rust-lang.org/borrow_check.html
151-
[mir-opt]: https://rustc-dev-guide.rust-lang.org/mir/optimizations.html
146+
[*type inference*]: type-inference.md
147+
[*trait solving*]: traits/resolution.md
148+
[*type checking*]: type-checking.md
149+
[mir]: mir/index.md
150+
[borrow checking]: borrow_check.md
151+
[mir-opt]: mir/optimizations.md
152152
[`simplify_try`]: https://github.com/rust-lang/rust/pull/66282
153-
[codegen]: https://rustc-dev-guide.rust-lang.org/backend/codegen.html
153+
[codegen]: backend/codegen.md
154154
[parse_nonterminal]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_parse/parser/struct.Parser.html#method.parse_nonterminal
155155
[parse_crate_mod]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_parse/parser/struct.Parser.html#method.parse_crate_mod
156156
[parse_mod]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_parse/parser/struct.Parser.html#method.parse_mod
@@ -364,21 +364,21 @@ For more details on bootstrapping, see
364364
- Where do phases diverge for cross-compilation to machine code across
365365
different platforms?
366366
-->
367-
367+
368368
# References
369369

370370
- Command line parsing
371-
- Guide: [The Rustc Driver and Interface](https://rustc-dev-guide.rust-lang.org/rustc-driver.html)
371+
- Guide: [The Rustc Driver and Interface](rustc-driver.md)
372372
- Driver definition: [`rustc_driver`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_driver/)
373373
- Main entry point: [`rustc_session::config::build_session_options`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_session/config/fn.build_session_options.html)
374374
- Lexical Analysis: Lex the user program to a stream of tokens
375-
- Guide: [Lexing and Parsing](https://rustc-dev-guide.rust-lang.org/the-parser.html)
375+
- Guide: [Lexing and Parsing](the-parser.md)
376376
- Lexer definition: [`rustc_lexer`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lexer/index.html)
377377
- Main entry point: [`rustc_lexer::first_token`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lexer/fn.first_token.html)
378378
- Parsing: Parse the stream of tokens to an Abstract Syntax Tree (AST)
379-
- Guide: [Lexing and Parsing](https://rustc-dev-guide.rust-lang.org/the-parser.html)
380-
- Guide: [Macro Expansion](https://rustc-dev-guide.rust-lang.org/macro-expansion.html)
381-
- Guide: [Name Resolution](https://rustc-dev-guide.rust-lang.org/name-resolution.html)
379+
- Guide: [Lexing and Parsing](the-parser.md)
380+
- Guide: [Macro Expansion](macro-expansion.md)
381+
- Guide: [Name Resolution](name-resolution.md)
382382
- Parser definition: [`rustc_parse`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_parse/index.html)
383383
- Main entry points:
384384
- [Entry point for first file in crate](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_interface/passes/fn.parse.html)
@@ -388,34 +388,34 @@ For more details on bootstrapping, see
388388
- Feature gating: **TODO**
389389
- Early linting: **TODO**
390390
- The High Level Intermediate Representation (HIR)
391-
- Guide: [The HIR](https://rustc-dev-guide.rust-lang.org/hir.html)
392-
- Guide: [Identifiers in the HIR](https://rustc-dev-guide.rust-lang.org/hir.html#identifiers-in-the-hir)
393-
- Guide: [The HIR Map](https://rustc-dev-guide.rust-lang.org/hir.html#the-hir-map)
394-
- Guide: [Lowering AST to HIR](https://rustc-dev-guide.rust-lang.org/lowering.html)
391+
- Guide: [The HIR](hir.md)
392+
- Guide: [Identifiers in the HIR](hir.md#identifiers-in-the-hir)
393+
- Guide: [The HIR Map](hir.md#the-hir-map)
394+
- Guide: [Lowering AST to HIR](lowering.md)
395395
- How to view HIR representation for your code `cargo rustc -- -Z unpretty=hir-tree`
396396
- Rustc HIR definition: [`rustc_hir`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/index.html)
397397
- Main entry point: **TODO**
398398
- Late linting: **TODO**
399399
- Type Inference
400-
- Guide: [Type Inference](https://rustc-dev-guide.rust-lang.org/type-inference.html)
401-
- Guide: [The ty Module: Representing Types](https://rustc-dev-guide.rust-lang.org/ty.html) (semantics)
400+
- Guide: [Type Inference](type-inference.md)
401+
- Guide: [The ty Module: Representing Types](ty.md) (semantics)
402402
- Main entry point (type inference): [`InferCtxtBuilder::enter`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_infer/infer/struct.InferCtxtBuilder.html#method.enter)
403403
- Main entry point (type checking bodies): [the `typeck` query](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.TyCtxt.html#method.typeck)
404404
- These two functions can't be decoupled.
405405
- The Mid Level Intermediate Representation (MIR)
406-
- Guide: [The MIR (Mid level IR)](https://rustc-dev-guide.rust-lang.org/mir/index.html)
406+
- Guide: [The MIR (Mid level IR)](mir/index.md)
407407
- Definition: [`rustc_middle/src/mir`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/index.html)
408408
- Definition of sources that manipulates the MIR: [`rustc_mir_build`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_build/index.html), [`rustc_mir_dataflow`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_dataflow/index.html), [`rustc_mir_transform`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/index.html)
409409
- The Borrow Checker
410-
- Guide: [MIR Borrow Check](https://rustc-dev-guide.rust-lang.org/borrow_check.html)
410+
- Guide: [MIR Borrow Check](borrow_check.md)
411411
- Definition: [`rustc_borrowck`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/index.html)
412412
- Main entry point: [`mir_borrowck` query](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/fn.mir_borrowck.html)
413413
- MIR Optimizations
414-
- Guide: [MIR Optimizations](https://rustc-dev-guide.rust-lang.org/mir/optimizations.html)
414+
- Guide: [MIR Optimizations](mir/optimizations.md)
415415
- Definition: [`rustc_mir_transform`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/index.html)
416416
- Main entry point: [`optimized_mir` query](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/fn.optimized_mir.html)
417417
- Code Generation
418-
- Guide: [Code Generation](https://rustc-dev-guide.rust-lang.org/backend/codegen.html)
418+
- Guide: [Code Generation](backend/codegen.md)
419419
- Generating Machine Code from LLVM IR with LLVM - **TODO: reference?**
420420
- Main entry point: [`rustc_codegen_ssa::base::codegen_crate`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_codegen_ssa/base/fn.codegen_crate.html)
421421
- This monomorphizes and produces LLVM IR for one codegen unit. It then

src/parallel-rustc.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ independent instances of LLVM running in parallel. At the end, the linker
2929
is run to combine all the codegen units together into one binary. This process
3030
occurs in the `rustc_codegen_ssa::base` module.
3131

32-
## Query System
32+
## Query System
3333

3434
The query model has some properties that make it actually feasible to evaluate
3535
multiple queries in parallel without too much of an effort:
@@ -54,7 +54,7 @@ When a query `foo` is evaluated, the cache table for `foo` is locked.
5454

5555
## Rustdoc
5656

57-
As of <!-- date: 2022-05--> May 2022, there are still a number of steps
57+
As of <!-- date: 2022-05--> May 2022, there are still a number of steps
5858
to complete before rustdoc rendering can be made parallel. More details on
5959
this issue can be found [here][parallel-rustdoc].
6060

@@ -99,8 +99,8 @@ are a bit out of date):
9999
[imlist]: https://github.com/nikomatsakis/rustc-parallelization/blob/master/interior-mutability-list.md
100100
[irlo1]: https://internals.rust-lang.org/t/help-test-parallel-rustc/11503
101101
[tracking]: https://github.com/rust-lang/rust/issues/48685
102-
[monomorphization]:https://rustc-dev-guide.rust-lang.org/backend/monomorph.html
103-
[parallel-rustdoc]:https://github.com/rust-lang/rust/issues/82741
104-
[Arc]:https://doc.rust-lang.org/std/sync/struct.Arc.html
105-
[Rc]:https://doc.rust-lang.org/std/rc/struct.Rc.html
106-
[OwningRef]:https://doc.rust-lang.org/nightly/nightly-rustc/rustc_data_structures/owning_ref/index.html
102+
[monomorphization]: backend/monomorph.md
103+
[parallel-rustdoc]: https://github.com/rust-lang/rust/issues/82741
104+
[Arc]: https://doc.rust-lang.org/std/sync/struct.Arc.html
105+
[Rc]: https://doc.rust-lang.org/std/rc/struct.Rc.html
106+
[OwningRef]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_data_structures/owning_ref/index.html

0 commit comments

Comments
 (0)