Skip to content

Commit fbcd0ac

Browse files
committed
lowering doesn't error
1 parent c69688a commit fbcd0ac

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
@@ -157,6 +157,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
157157
if let ItemKind::Fn(f) = &i.kind {
158158
extra_hir_attributes.extend(f.eii_impl.iter().map(|(id, mi)| {
159159
let did = self.lower_path_simple_eii(*id, &mi.path);
160+
160161
hir::Attribute::Parsed(AttributeKind::EiiImpl { eii_macro: did })
161162
}));
162163
}
@@ -531,22 +532,13 @@ impl<'hir> LoweringContext<'_, 'hir> {
531532
}
532533

533534
fn lower_path_simple_eii(&mut self, id: NodeId, path: &Path) -> DefId {
534-
let lowered = self.lower_qpath(
535-
id,
536-
&None,
537-
path,
538-
ParamMode::Explicit,
539-
crate::AllowReturnTypeNotation::No,
540-
ImplTraitContext::Disallowed(ImplTraitPosition::Path),
541-
None,
542-
);
543-
544-
let QPath::Resolved(None, path) = lowered else {
545-
// TODO
546-
panic!("{lowered:?}");
535+
let res = self.resolver.get_partial_res(id).unwrap();
536+
let Some(did) = res.expect_full_res().opt_def_id() else {
537+
self.dcx().span_delayed_bug(path.span, "should have errored in resolve");
538+
todo!()
547539
};
548540

549-
path.res.def_id()
541+
did
550542
}
551543

552544
fn lower_const_item(

0 commit comments

Comments
 (0)