Link to internal rustdocs#100
This commit is contained in:
parent
7a3cf36d65
commit
041af7c28c
|
|
@ -87,7 +87,7 @@ in [librustc_back](https://github.com/rust-lang/rust/tree/master/src/librustc_ba
|
|||
(which also contains some things used primarily during translation).
|
||||
|
||||
All these phases are coordinated by the driver. To see the exact sequence, look
|
||||
at the `compile_input` function in [librustc_driver/driver.rs](https://github.com/rust-lang/rust/tree/master/src/librustc_driver/driver.rs).
|
||||
at the `compile_input` function in [librustc_driver/driver.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_driver/driver/).
|
||||
The driver (which is found in [librust_driver](https://github.com/rust-lang/rust/tree/master/src/librustc_driver))
|
||||
handles all the highest level coordination of compilation - handling command
|
||||
line arguments, maintaining compilation state (primarily in the `Session`), and
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ TODO
|
|||
|
||||
|
||||
[code_dir]: https://github.com/rust-lang/rust/tree/master/src/libsyntax/ext/tt
|
||||
[code_mp]: https://github.com/rust-lang/rust/tree/master/src/libsyntax/ext/tt/macro_parser.rs
|
||||
[code_mr]: https://github.com/rust-lang/rust/tree/master/src/libsyntax/ext/tt/macro_rules.rs
|
||||
[code_parse_int]: https://github.com/rust-lang/rust/blob/a97cd17f5d71fb4ec362f4fbd79373a6e7ed7b82/src/libsyntax/ext/tt/macro_parser.rs#L421
|
||||
[code_mp]: https://doc.rust-lang.org/nightly/nightly-rustc/syntax/ext/tt/macro_parser/
|
||||
[code_mr]: https://doc.rust-lang.org/nightly/nightly-rustc/syntax/ext/tt/macro_rules/
|
||||
[code_parse_int]: https://doc.rust-lang.org/nightly/nightly-rustc/syntax/ext/tt/macro_parser/fn.parse.html
|
||||
[parsing]: ./the-parser.html
|
||||
|
|
|
|||
|
|
@ -172,6 +172,6 @@ This mechanism is a bit dodgy. There is a discussion of more elegant
|
|||
alternatives in [rust-lang/rust#41710].
|
||||
|
||||
[rust-lang/rust#41710]: https://github.com/rust-lang/rust/issues/41710
|
||||
[mirtransform]: https://github.com/rust-lang/rust/tree/master/src/librustc_mir/transform/mod.rs
|
||||
[`NoLandingPads`]: https://github.com/rust-lang/rust/tree/master/src/librustc_mir/transform/no_landing_pads.rs
|
||||
[mirtransform]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/transform/
|
||||
[`NoLandingPads`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/transform/no_landing_pads/struct.NoLandingPads.html
|
||||
[MIR visitor]: mir-visitor.html
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ them, generated via a single macro: `Visitor` (which operates on a
|
|||
`&Mir` and gives back shared references) and `MutVisitor` (which
|
||||
operates on a `&mut Mir` and gives back mutable references).
|
||||
|
||||
[m-v]: https://github.com/rust-lang/rust/tree/master/src/librustc/mir/visit.rs
|
||||
[m-v]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc/mir/visit/index.html
|
||||
|
||||
To implement a visitor, you have to create a type that represents
|
||||
your visitor. Typically, this type wants to "hang on" to whatever
|
||||
|
|
@ -41,7 +41,7 @@ A very simple example of a visitor can be found in [`NoLandingPads`].
|
|||
That visitor doesn't even require any state: it just visits all
|
||||
terminators and removes their `unwind` successors.
|
||||
|
||||
[`NoLandingPads`]: https://github.com/rust-lang/rust/tree/master/src/librustc_mir/transform/no_landing_pads.rs
|
||||
[`NoLandingPads`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/transform/no_landing_pads/struct.NoLandingPads.html
|
||||
|
||||
## Traversal
|
||||
|
||||
|
|
@ -50,6 +50,6 @@ contains useful functions for walking the MIR CFG in
|
|||
[different standard orders][traversal] (e.g. pre-order, reverse
|
||||
post-order, and so forth).
|
||||
|
||||
[t]: https://github.com/rust-lang/rust/tree/master/src/librustc/mir/traversal.rs
|
||||
[t]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc/mir/traversal/index.html
|
||||
[traversal]: https://en.wikipedia.org/wiki/Tree_traversal
|
||||
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ the big macro invocation in
|
|||
changed by the time you read this README, but at present it looks
|
||||
something like:
|
||||
|
||||
[maps-mod]: https://github.com/rust-lang/rust/blob/master/src/librustc/ty/maps/mod.rs
|
||||
[maps-mod]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc/ty/maps/index.html
|
||||
|
||||
```
|
||||
define_maps! { <'tcx>
|
||||
|
|
@ -270,7 +270,7 @@ Let's go over them one by one:
|
|||
of `Steal` for more details. New uses of `Steal` should **not** be
|
||||
added without alerting `@rust-lang/compiler`.
|
||||
|
||||
[dep-node]: https://github.com/rust-lang/rust/blob/master/src/librustc/dep_graph/dep_node.rs
|
||||
[dep-node]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc/dep_graph/struct.DepNode.html
|
||||
|
||||
So, to add a query:
|
||||
|
||||
|
|
|
|||
|
|
@ -67,10 +67,10 @@ pervasive lifetimes. The `rustc::ty::tls` module is used to access these
|
|||
thread-locals, although you should rarely need to touch it.
|
||||
|
||||
|
||||
[`rustc_driver`]: https://github.com/rust-lang/rust/tree/master/src/librustc_driver
|
||||
[`CompileState`]: https://github.com/rust-lang/rust/blob/master/src/librustc_driver/driver.rs
|
||||
[`Session`]: https://github.com/rust-lang/rust/blob/master/src/librustc/session/mod.rs
|
||||
[`TyCtxt`]: https://github.com/rust-lang/rust/blob/master/src/librustc/ty/context.rs
|
||||
[`CodeMap`]: https://github.com/rust-lang/rust/blob/master/src/libsyntax/codemap.rs
|
||||
[`rustc_driver`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_driver/
|
||||
[`CompileState`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_driver/driver/struct.CompileState.html
|
||||
[`Session`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc/session/struct.Session.html
|
||||
[`TyCtxt`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc/ty/struct.TyCtxt.html
|
||||
[`CodeMap`]: https://doc.rust-lang.org/nightly/nightly-rustc/syntax/codemap/struct.CodeMap.html
|
||||
[stupid-stats]: https://github.com/nrc/stupid-stats
|
||||
[Appendix A]: appendix-stupid-stats.html
|
||||
|
|
@ -34,9 +34,9 @@ all the information needed while parsing, as well as the `CodeMap` itself.
|
|||
[libsyntax]: https://github.com/rust-lang/rust/tree/master/src/libsyntax
|
||||
[rustc_errors]: https://github.com/rust-lang/rust/tree/master/src/librustc_errors
|
||||
[ast]: https://en.wikipedia.org/wiki/Abstract_syntax_tree
|
||||
[`CodeMap`]: https://github.com/rust-lang/rust/blob/master/src/libsyntax/codemap.rs
|
||||
[ast module]: https://github.com/rust-lang/rust/blob/master/src/libsyntax/ast.rs
|
||||
[`CodeMap`]: https://doc.rust-lang.org/nightly/nightly-rustc/syntax/codemap/struct.CodeMap.html
|
||||
[ast module]: https://doc.rust-lang.org/nightly/nightly-rustc/syntax/ast/index.html
|
||||
[parser module]: https://github.com/rust-lang/rust/tree/master/src/libsyntax/parse
|
||||
[`Parser`]: https://github.com/rust-lang/rust/blob/master/src/libsyntax/parse/parser.rs
|
||||
[`StringReader`]: https://github.com/rust-lang/rust/blob/master/src/libsyntax/parse/lexer/mod.rs
|
||||
[visit module]: https://github.com/rust-lang/rust/blob/master/src/libsyntax/visit.rs
|
||||
[`Parser`]: https://doc.rust-lang.org/nightly/nightly-rustc/syntax/parse/parser/struct.Parser.html
|
||||
[`StringReader`]: https://doc.rust-lang.org/nightly/nightly-rustc/syntax/parse/lexer/struct.StringReader.html
|
||||
[visit module]: https://doc.rust-lang.org/nightly/nightly-rustc/syntax/visit/index.html
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ The program clauses described in the
|
|||
[lowering rules](./traits-lowering-rules.html) section are actually
|
||||
created in the [`rustc_traits::lowering`][lowering] module.
|
||||
|
||||
[lowering]: https://github.com/rust-lang/rust/tree/master/src/librustc_traits/lowering.rs
|
||||
[lowering]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_traits/lowering/
|
||||
|
||||
## The `program_clauses_for` query
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue