File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
compiler/rustc_incremental/src/persist Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ pub fn check_dirty_clean_annotations(tcx: TyCtxt<'_>) {
168168 // Note that we cannot use the existing "unused attribute"-infrastructure
169169 // here, since that is running before codegen. This is also the reason why
170170 // all codegen-specific attributes are `AssumedUsed` in rustc_ast::feature_gate.
171- all_attrs. report_unchecked_attrs ( & dirty_clean_visitor. checked_attrs ) ;
171+ all_attrs. report_unchecked_attrs ( dirty_clean_visitor. checked_attrs ) ;
172172 } )
173173}
174174
@@ -535,13 +535,14 @@ impl FindAllAttrs<'_, 'tcx> {
535535 false
536536 }
537537
538- fn report_unchecked_attrs ( & self , checked_attrs : & FxHashSet < ast:: AttrId > ) {
538+ fn report_unchecked_attrs ( & self , mut checked_attrs : FxHashSet < ast:: AttrId > ) {
539539 for attr in & self . found_attrs {
540540 if !checked_attrs. contains ( & attr. id ) {
541541 self . tcx . sess . span_err (
542542 attr. span ,
543543 "found unchecked `#[rustc_dirty]` / `#[rustc_clean]` attribute" ,
544544 ) ;
545+ checked_attrs. insert ( attr. id ) ;
545546 }
546547 }
547548 }
You can’t perform that action at this time.
0 commit comments