Resolver trait moved (#652)

This commit is contained in:
Tshepang Lekhonkhobe 2020-04-01 11:04:45 +02:00 committed by GitHub
parent 271115f85d
commit ced2a9c244
1 changed files with 3 additions and 2 deletions

View File

@ -19,8 +19,8 @@ namespaces and therefore can co-exist.
The name resolution in Rust is a two-phase process. In the first phase, which runs The name resolution in Rust is a two-phase process. In the first phase, which runs
during macro expansion, we build a tree of modules and resolve imports. Macro during macro expansion, we build a tree of modules and resolve imports. Macro
expansion and name resolution communicate with each other via the `Resolver` expansion and name resolution communicate with each other via the
trait, defined in `librustc_ast`. [`Resolver`] trait.
The input to the second phase is the syntax tree, produced by parsing input The input to the second phase is the syntax tree, produced by parsing input
files and expanding macros. This phase produces links from all the names in the files and expanding macros. This phase produces links from all the names in the
@ -36,6 +36,7 @@ The name resolution lives in the `librustc_resolve` crate, with the meat in
`lib.rs` and some helpers or symbol-type specific logic in the other modules. `lib.rs` and some helpers or symbol-type specific logic in the other modules.
[`Resolver::resolve_crate`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_resolve/struct.Resolver.html#method.resolve_crate [`Resolver::resolve_crate`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_resolve/struct.Resolver.html#method.resolve_crate
[`Resolver`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_ast_lowering/trait.Resolver.html
## Namespaces ## Namespaces