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 @@ -157,6 +157,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
157
157
if let ItemKind :: Fn ( f) = & i. kind {
158
158
extra_hir_attributes. extend ( f. eii_impl . iter ( ) . map ( |( id, mi) | {
159
159
let did = self . lower_path_simple_eii ( * id, & mi. path ) ;
160
+
160
161
hir:: Attribute :: Parsed ( AttributeKind :: EiiImpl { eii_macro : did } )
161
162
} ) ) ;
162
163
}
@@ -531,22 +532,13 @@ impl<'hir> LoweringContext<'_, 'hir> {
531
532
}
532
533
533
534
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 ! ( )
547
539
} ;
548
540
549
- path . res . def_id ( )
541
+ did
550
542
}
551
543
552
544
fn lower_const_item (
You can’t perform that action at this time.
0 commit comments