]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/hir/intravisit.rs
rustc: always include elidable lifetimes in HIR types.
[rust.git] / src / librustc / hir / intravisit.rs
index 7527d7fb318dddc543424d2012f25605e83f2af4..d71263bea0046a76105506ceaada2d47fe52d15c 100644 (file)
@@ -154,7 +154,7 @@ pub trait Visitor<'v> : Sized {
     /// hashed separately.
     ///
     /// **If for some reason you want the nested behavior, but don't
-    /// have a `Map` are your disposal:** then you should override the
+    /// have a `Map` at your disposal:** then you should override the
     /// `visit_nested_XXX` methods, and override this method to
     /// `panic!()`. This way, if a new `visit_nested_XXX` variant is
     /// added in the future, we will see the panic in your code and
@@ -547,8 +547,8 @@ pub fn walk_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty) {
         TyPtr(ref mutable_type) => {
             visitor.visit_ty(&mutable_type.ty)
         }
-        TyRptr(ref opt_lifetime, ref mutable_type) => {
-            walk_list!(visitor, visit_lifetime, opt_lifetime);
+        TyRptr(ref lifetime, ref mutable_type) => {
+            visitor.visit_lifetime(lifetime);
             visitor.visit_ty(&mutable_type.ty)
         }
         TyNever => {},
@@ -661,7 +661,7 @@ pub fn walk_pat<'v, V: Visitor<'v>>(visitor: &mut V, pattern: &'v Pat) {
             walk_list!(visitor, visit_pat, optional_subpattern);
         }
         PatKind::Lit(ref expression) => visitor.visit_expr(expression),
-        PatKind::Range(ref lower_bound, ref upper_bound) => {
+        PatKind::Range(ref lower_bound, ref upper_bound, _) => {
             visitor.visit_expr(lower_bound);
             visitor.visit_expr(upper_bound)
         }
@@ -1085,13 +1085,13 @@ pub fn add(&mut self, id: NodeId) {
 }
 
 
-pub struct IdRangeComputingVisitor<'a, 'ast: 'a> {
+pub struct IdRangeComputingVisitor<'a, 'hir: 'a> {
     result: IdRange,
-    map: &'a map::Map<'ast>,
+    map: &'a map::Map<'hir>,
 }
 
-impl<'a, 'ast> IdRangeComputingVisitor<'a, 'ast> {
-    pub fn new(map: &'a map::Map<'ast>) -> IdRangeComputingVisitor<'a, 'ast> {
+impl<'a, 'hir> IdRangeComputingVisitor<'a, 'hir> {
+    pub fn new(map: &'a map::Map<'hir>) -> IdRangeComputingVisitor<'a, 'hir> {
         IdRangeComputingVisitor { result: IdRange::max(), map: map }
     }
 
@@ -1100,8 +1100,8 @@ pub fn result(&self) -> IdRange {
     }
 }
 
-impl<'a, 'ast> Visitor<'ast> for IdRangeComputingVisitor<'a, 'ast> {
-    fn nested_visit_map<'this>(&'this mut self) -> NestedVisitorMap<'this, 'ast> {
+impl<'a, 'hir> Visitor<'hir> for IdRangeComputingVisitor<'a, 'hir> {
+    fn nested_visit_map<'this>(&'this mut self) -> NestedVisitorMap<'this, 'hir> {
         NestedVisitorMap::OnlyBodies(&self.map)
     }