Skip to content

Commit 8d9ba29

Browse files
committed
Minor bugfix for macro invocation path resolution.
1 parent 51f25b3 commit 8d9ba29

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/librustc_resolve/macros.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,10 @@ impl<'a> base::Resolver for Resolver<'a> {
205205
}
206206

207207
let ext = match self.resolve_path(&path, path_scope, Some(MacroNS), None) {
208-
PathResult::NonModule(path_res) => Ok(self.get_macro(path_res.base_def)),
208+
PathResult::NonModule(path_res) => match path_res.base_def {
209+
Def::Err => Err(Determinacy::Determined),
210+
def @ _ => Ok(self.get_macro(def)),
211+
},
209212
PathResult::Module(..) => unreachable!(),
210213
PathResult::Indeterminate if !force => return Err(Determinacy::Undetermined),
211214
_ => Err(Determinacy::Determined),

0 commit comments

Comments
 (0)