File tree 2 files changed +14
-5
lines changed
2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -880,11 +880,11 @@ impl Visitor<'tcx> for EmbargoVisitor<'tcx> {
880
880
self . tcx ,
881
881
self . tcx . hir ( ) . local_def_id ( md. hir_id )
882
882
) . unwrap ( ) ;
883
- let mut module_id = self . tcx . hir ( ) . as_local_hir_id ( macro_module_def_id) . unwrap ( ) ;
884
- if ! self . tcx . hir ( ) . is_hir_id_module ( module_id) {
885
- // `module_id` doesn't correspond to a `mod`, return early (#63164).
886
- return ;
887
- }
883
+ let mut module_id = match self . tcx . hir ( ) . as_local_hir_id ( macro_module_def_id) {
884
+ Some ( module_id ) if self . tcx . hir ( ) . is_hir_id_module ( module_id) => module_id ,
885
+ // `module_id` doesn't correspond to a `mod`, return early (#63164, #65252 ).
886
+ _ => return ,
887
+ } ;
888
888
let level = if md. vis . node . is_pub ( ) { self . get ( module_id) } else { None } ;
889
889
let new_level = self . update ( md. hir_id , level) ;
890
890
if new_level. is_none ( ) {
Original file line number Diff line number Diff line change
1
+ // Regression issue for rustdoc ICE encountered in PR #65252.
2
+
3
+ #![ feature( decl_macro) ]
4
+
5
+ fn main ( ) {
6
+ || {
7
+ macro m( ) { }
8
+ } ;
9
+ }
You can’t perform that action at this time.
0 commit comments