Skip to content

Commit 43f6b96

Browse files
Manishearthalexcrichton
authored andcommitted
Clarify what the lexical resolutions are in resolve_path
1 parent adf2dce commit 43f6b96

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/librustc_resolve/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -3322,7 +3322,9 @@ impl<'a> Resolver<'a> {
33223322
.map(MacroBinding::binding)
33233323
} else {
33243324
match self.resolve_ident_in_lexical_scope(ident, ns, record_used, path_span) {
3325+
// we found a locally-imported or available item/module
33253326
Some(LexicalScopeBinding::Item(binding)) => Ok(binding),
3327+
// we found a local variable or type param
33263328
Some(LexicalScopeBinding::Def(def))
33273329
if opt_ns == Some(TypeNS) || opt_ns == Some(ValueNS) => {
33283330
return PathResult::NonModule(PathResolution::with_unresolved_segments(

0 commit comments

Comments
 (0)