about summary refs log tree commit diff
path: root/compiler/rustc_incremental/src
diff options
context:
space:
mode:
authorDániel Buga <bugadani@gmail.com>2020-10-28 16:42:28 +0100
committerDániel Buga <bugadani@gmail.com>2020-10-28 16:42:28 +0100
commitf3e6d882fec61ef290b9097f896cfbcf39f5b4bd (patch)
treee1b7c8e926f27430bf514abb5a2281602a9ab0be /compiler/rustc_incremental/src
parent2eb4fc800aaf5006f89af3af591e2aa34f469d81 (diff)
downloadrust-f3e6d882fec61ef290b9097f896cfbcf39f5b4bd.tar.gz
rust-f3e6d882fec61ef290b9097f896cfbcf39f5b4bd.zip
Fix typos and replace static vector with slice
Diffstat (limited to 'compiler/rustc_incremental/src')
-rw-r--r--compiler/rustc_incremental/src/persist/dirty_clean.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/compiler/rustc_incremental/src/persist/dirty_clean.rs b/compiler/rustc_incremental/src/persist/dirty_clean.rs
index f0a10885550..d55813f4cc5 100644
--- a/compiler/rustc_incremental/src/persist/dirty_clean.rs
+++ b/compiler/rustc_incremental/src/persist/dirty_clean.rs
@@ -160,7 +160,7 @@ pub fn check_dirty_clean_annotations(tcx: TyCtxt<'_>) {
 
         let mut all_attrs = FindAllAttrs {
             tcx,
-            attr_names: vec![sym::rustc_dirty, sym::rustc_clean],
+            attr_names: &[sym::rustc_dirty, sym::rustc_clean],
             found_attrs: vec![],
         };
         intravisit::walk_crate(&mut all_attrs, krate);
@@ -299,7 +299,7 @@ impl DirtyCleanVisitor<'tcx> {
 
                     // Represents a Trait Declaration
                     // FIXME(michaelwoerister): trait declaration is buggy because sometimes some of
-                    // the depnodes don't exist (because they legitametely didn't need to be
+                    // the depnodes don't exist (because they legitimately didn't need to be
                     // calculated)
                     //
                     // michaelwoerister and vitiral came up with a possible solution,
@@ -512,17 +512,17 @@ fn expect_associated_value(tcx: TyCtxt<'_>, item: &NestedMetaItem) -> Symbol {
 }
 
 // A visitor that collects all #[rustc_dirty]/#[rustc_clean] attributes from
-// the HIR. It is used to verfiy that we really ran checks for all annotated
+// the HIR. It is used to verify that we really ran checks for all annotated
 // nodes.
-pub struct FindAllAttrs<'tcx> {
+pub struct FindAllAttrs<'a, 'tcx> {
     tcx: TyCtxt<'tcx>,
-    attr_names: Vec<Symbol>,
+    attr_names: &'a [Symbol],
     found_attrs: Vec<&'tcx Attribute>,
 }
 
-impl FindAllAttrs<'tcx> {
+impl FindAllAttrs<'_, 'tcx> {
     fn is_active_attr(&mut self, attr: &Attribute) -> bool {
-        for attr_name in &self.attr_names {
+        for attr_name in self.attr_names {
             if self.tcx.sess.check_name(attr, *attr_name) && check_config(self.tcx, attr) {
                 return true;
             }
@@ -543,7 +543,7 @@ impl FindAllAttrs<'tcx> {
     }
 }
 
-impl intravisit::Visitor<'tcx> for FindAllAttrs<'tcx> {
+impl intravisit::Visitor<'tcx> for FindAllAttrs<'_, 'tcx> {
     type Map = Map<'tcx>;
 
     fn nested_visit_map(&mut self) -> intravisit::NestedVisitorMap<Self::Map> {