about summary refs log tree commit diff
path: root/src/doc
diff options
context:
space:
mode:
authorMichal 'vorner' Vaner <vorner@vorner.cz>2018-02-18 18:03:46 +0100
committerWho? Me?! <mark-i-m@users.noreply.github.com>2018-03-04 13:29:37 -0600
commitd58961b4c3d3f1d7055d738626ed2b352e5e15aa (patch)
tree3435dfb456e3aeddf47be051b39863f28b117592 /src/doc
parenta4f762f74d916b80f2b6be2299426b94dee4a0ef (diff)
downloadrust-d58961b4c3d3f1d7055d738626ed2b352e5e15aa.tar.gz
rust-d58961b4c3d3f1d7055d738626ed2b352e5e15aa.zip
Second pass of name resolution
Just small little tweaks
Diffstat (limited to 'src/doc')
-rw-r--r--src/doc/rustc-dev-guide/src/name-resolution.md9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/doc/rustc-dev-guide/src/name-resolution.md b/src/doc/rustc-dev-guide/src/name-resolution.md
index 25ce3e29eb9..5095b750abd 100644
--- a/src/doc/rustc-dev-guide/src/name-resolution.md
+++ b/src/doc/rustc-dev-guide/src/name-resolution.md
@@ -3,7 +3,12 @@
 The name resolution is a separate pass in the compiler. Its input is the syntax
 tree, produced by parsing input files. It produces links from all the names in
 the source to relevant places where the name was introduced. It also generates
-helpful error messages, like typo suggestions or traits to import.
+helpful error messages, like typo suggestions, traits to import or lints about
+unused items.
+
+A successful run of the name resolution (`Resolver::resolve_crate`) creates kind
+of an index the rest of the compilation may use to ask about the present names
+(through the `hir::lowering::Resolver` interface).
 
 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.
@@ -72,6 +77,8 @@ fn do_something<T: Default>(val: T) { // <- New rib in both types and values (1)
 
 Because the rules for different namespaces are a bit different, each namespace
 has its own independent rib stack that is constructed in parallel to the others.
+In addition, there's also a rib stack for local labels (eg. names of loops or
+blocks), which isn't a full namespace in its own right.
 
 ## Overall strategy