File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
compiler/rustc_interface/src Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -4,21 +4,16 @@ use rustc_middle::ty::TyCtxt;
44use rustc_span:: symbol:: sym;
55
66fn proc_macro_decls_static ( tcx : TyCtxt < ' _ > , ( ) : ( ) ) -> Option < LocalDefId > {
7- let mut finder = Finder { tcx , decls : None } ;
7+ let mut decls = None ;
88
99 for id in tcx. hir ( ) . items ( ) {
10- let attrs = finder . tcx . hir ( ) . attrs ( id. hir_id ( ) ) ;
11- if finder . tcx . sess . contains_name ( attrs, sym:: rustc_proc_macro_decls) {
12- finder . decls = Some ( id. owner_id . def_id ) ;
10+ let attrs = tcx. hir ( ) . attrs ( id. hir_id ( ) ) ;
11+ if tcx. sess . contains_name ( attrs, sym:: rustc_proc_macro_decls) {
12+ decls = Some ( id. owner_id . def_id ) ;
1313 }
1414 }
1515
16- finder. decls
17- }
18-
19- struct Finder < ' tcx > {
20- tcx : TyCtxt < ' tcx > ,
21- decls : Option < LocalDefId > ,
16+ decls
2217}
2318
2419pub ( crate ) fn provide ( providers : & mut Providers ) {
You can’t perform that action at this time.
0 commit comments