Skip to content

Commit 0d25e75

Browse files
committed
lowering doesn't error
1 parent def205c commit 0d25e75

File tree

1 file changed

+6
-14
lines changed
  • compiler/rustc_ast_lowering/src

1 file changed

+6
-14
lines changed

compiler/rustc_ast_lowering/src/item.rs

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
164164
if let ItemKind::Fn(f) = &i.kind {
165165
extra_hir_attributes.extend(f.eii_impl.iter().map(|(id, mi)| {
166166
let did = self.lower_path_simple_eii(*id, &mi.path);
167+
167168
hir::Attribute::Parsed(AttributeKind::EiiImpl { eii_macro: did })
168169
}));
169170
}
@@ -485,22 +486,13 @@ impl<'hir> LoweringContext<'_, 'hir> {
485486
}
486487

487488
fn lower_path_simple_eii(&mut self, id: NodeId, path: &Path) -> DefId {
488-
let lowered = self.lower_qpath(
489-
id,
490-
&None,
491-
path,
492-
ParamMode::Explicit,
493-
crate::AllowReturnTypeNotation::No,
494-
ImplTraitContext::Disallowed(ImplTraitPosition::Path),
495-
None,
496-
);
497-
498-
let QPath::Resolved(None, path) = lowered else {
499-
// TODO
500-
panic!("{lowered:?}");
489+
let res = self.resolver.get_partial_res(id).unwrap();
490+
let Some(did) = res.expect_full_res().opt_def_id() else {
491+
self.dcx().span_delayed_bug(path.span, "should have errored in resolve");
492+
todo!()
501493
};
502494

503-
path.res.def_id()
495+
did
504496
}
505497

506498
fn lower_const_item(

0 commit comments

Comments
 (0)