@@ -160,7 +160,7 @@ pub fn check_dirty_clean_annotations(tcx: TyCtxt<'_>) {
160
160
161
161
let mut all_attrs = FindAllAttrs {
162
162
tcx,
163
- attr_names : vec ! [ sym:: rustc_dirty, sym:: rustc_clean] ,
163
+ attr_names : & [ sym:: rustc_dirty, sym:: rustc_clean] ,
164
164
found_attrs : vec ! [ ] ,
165
165
} ;
166
166
intravisit:: walk_crate ( & mut all_attrs, krate) ;
@@ -299,7 +299,7 @@ impl DirtyCleanVisitor<'tcx> {
299
299
300
300
// Represents a Trait Declaration
301
301
// FIXME(michaelwoerister): trait declaration is buggy because sometimes some of
302
- // the depnodes don't exist (because they legitametely didn't need to be
302
+ // the depnodes don't exist (because they legitimately didn't need to be
303
303
// calculated)
304
304
//
305
305
// michaelwoerister and vitiral came up with a possible solution,
@@ -512,17 +512,17 @@ fn expect_associated_value(tcx: TyCtxt<'_>, item: &NestedMetaItem) -> Symbol {
512
512
}
513
513
514
514
// A visitor that collects all #[rustc_dirty]/#[rustc_clean] attributes from
515
- // the HIR. It is used to verfiy that we really ran checks for all annotated
515
+ // the HIR. It is used to verify that we really ran checks for all annotated
516
516
// nodes.
517
- pub struct FindAllAttrs < ' tcx > {
517
+ pub struct FindAllAttrs < ' a , ' tcx > {
518
518
tcx : TyCtxt < ' tcx > ,
519
- attr_names : Vec < Symbol > ,
519
+ attr_names : & ' a [ Symbol ] ,
520
520
found_attrs : Vec < & ' tcx Attribute > ,
521
521
}
522
522
523
- impl FindAllAttrs < ' tcx > {
523
+ impl FindAllAttrs < ' _ , ' tcx > {
524
524
fn is_active_attr ( & mut self , attr : & Attribute ) -> bool {
525
- for attr_name in & self . attr_names {
525
+ for attr_name in self . attr_names {
526
526
if self . tcx . sess . check_name ( attr, * attr_name) && check_config ( self . tcx , attr) {
527
527
return true ;
528
528
}
@@ -543,7 +543,7 @@ impl FindAllAttrs<'tcx> {
543
543
}
544
544
}
545
545
546
- impl intravisit:: Visitor < ' tcx > for FindAllAttrs < ' tcx > {
546
+ impl intravisit:: Visitor < ' tcx > for FindAllAttrs < ' _ , ' tcx > {
547
547
type Map = Map < ' tcx > ;
548
548
549
549
fn nested_visit_map ( & mut self ) -> intravisit:: NestedVisitorMap < Self :: Map > {
0 commit comments