]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/hir/mod.rs
Make a lint instead
[rust.git] / src / librustc / hir / mod.rs
index 1b14caad3c83c0a5b0db044a78d7bb9e76855746..a3a133daa09c460bb7a3beec60612ce702a6aeb5 100644 (file)
@@ -892,6 +892,13 @@ pub fn attrs(&self) -> &[Attribute] {
             DeclItem(_) => &[]
         }
     }
+
+    pub fn is_local(&self) -> bool {
+        match *self {
+            Decl_::DeclLocal(_) => true,
+            _ => false,
+        }
+    }
 }
 
 /// represents one arm of a 'match'