Skip to content

Commit 04c05c7

Browse files
committed
Added doc comments for new UnresolvedNameContext enum.
1 parent 6946995 commit 04c05c7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/librustc_resolve/lib.rs

+9
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,18 @@ pub enum ResolutionError<'a> {
202202
AttemptToUseNonConstantValueInConstant,
203203
}
204204

205+
/// Context of where `ResolutionError::UnresolvedName` arose.
205206
#[derive(Clone, PartialEq, Eq, Debug)]
206207
pub enum UnresolvedNameContext {
208+
/// `PathIsMod(id)` indicates that a given path, used in
209+
/// expression context, actually resolved to a module rather than
210+
/// a value. The `id` attached to the variant is the node id of
211+
/// the erroneous path expression.
207212
PathIsMod(ast::NodeId),
213+
214+
/// `Other` means we have no extra information about the context
215+
/// of the unresolved name error. (Maybe we could eliminate all
216+
/// such cases; but for now, this is an information-free default.)
208217
Other,
209218
}
210219

0 commit comments

Comments
 (0)