/// 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
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 => {},
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)
}
}
-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 }
}
}
}
-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)
}