Skip to content

Commit 2b248f7

Browse files
committed
lowering doesn't error
1 parent 94ca8d8 commit 2b248f7

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
@@ -156,6 +156,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
156156
if let ItemKind::Fn(f) = &i.kind {
157157
extra_hir_attributes.extend(f.eii_impl.iter().map(|(id, mi)| {
158158
let did = self.lower_path_simple_eii(*id, &mi.path);
159+
159160
hir::Attribute::Parsed(AttributeKind::EiiImpl { eii_macro: did })
160161
}));
161162
}
@@ -518,22 +519,13 @@ impl<'hir> LoweringContext<'_, 'hir> {
518519
}
519520

520521
fn lower_path_simple_eii(&mut self, id: NodeId, path: &Path) -> DefId {
521-
let lowered = self.lower_qpath(
522-
id,
523-
&None,
524-
path,
525-
ParamMode::Explicit,
526-
crate::AllowReturnTypeNotation::No,
527-
ImplTraitContext::Disallowed(ImplTraitPosition::Path),
528-
None,
529-
);
530-
531-
let QPath::Resolved(None, path) = lowered else {
532-
// TODO
533-
panic!("{lowered:?}");
522+
let res = self.resolver.get_partial_res(id).unwrap();
523+
let Some(did) = res.expect_full_res().opt_def_id() else {
524+
self.dcx().span_delayed_bug(path.span, "should have errored in resolve");
525+
todo!()
534526
};
535527

536-
path.res.def_id()
528+
did
537529
}
538530

539531
fn lower_const_item(

0 commit comments

Comments
 (0)