File tree Expand file tree Collapse file tree 1 file changed +6
-14
lines changed
compiler/rustc_ast_lowering/src Expand file tree Collapse file tree 1 file changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -164,6 +164,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
164
164
if let ItemKind :: Fn ( f) = & i. kind {
165
165
extra_hir_attributes. extend ( f. eii_impl . iter ( ) . map ( |( id, mi) | {
166
166
let did = self . lower_path_simple_eii ( * id, & mi. path ) ;
167
+
167
168
hir:: Attribute :: Parsed ( AttributeKind :: EiiImpl { eii_macro : did } )
168
169
} ) ) ;
169
170
}
@@ -485,22 +486,13 @@ impl<'hir> LoweringContext<'_, 'hir> {
485
486
}
486
487
487
488
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 ! ( )
501
493
} ;
502
494
503
- path . res . def_id ( )
495
+ did
504
496
}
505
497
506
498
fn lower_const_item (
You can’t perform that action at this time.
0 commit comments