We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6946995 commit 04c05c7Copy full SHA for 04c05c7
src/librustc_resolve/lib.rs
@@ -202,9 +202,18 @@ pub enum ResolutionError<'a> {
202
AttemptToUseNonConstantValueInConstant,
203
}
204
205
+/// Context of where `ResolutionError::UnresolvedName` arose.
206
#[derive(Clone, PartialEq, Eq, Debug)]
207
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.
212
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.)
217
Other,
218
219
0 commit comments