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 @@ -156,6 +156,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
156
156
if let ItemKind :: Fn ( f) = & i. kind {
157
157
extra_hir_attributes. extend ( f. eii_impl . iter ( ) . map ( |( id, mi) | {
158
158
let did = self . lower_path_simple_eii ( * id, & mi. path ) ;
159
+
159
160
hir:: Attribute :: Parsed ( AttributeKind :: EiiImpl { eii_macro : did } )
160
161
} ) ) ;
161
162
}
@@ -518,22 +519,13 @@ impl<'hir> LoweringContext<'_, 'hir> {
518
519
}
519
520
520
521
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 ! ( )
534
526
} ;
535
527
536
- path . res . def_id ( )
528
+ did
537
529
}
538
530
539
531
fn lower_const_item (
You can’t perform that action at this time.
0 commit comments