From 1b487a890695e7d6dfbfe5dcd7d4fa0e8ca8003f Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Wed, 27 Aug 2014 21:46:52 -0400 Subject: Implement generalized object and type parameter bounds (Fixes #16462) --- src/libsyntax/ast_util.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/libsyntax/ast_util.rs') diff --git a/src/libsyntax/ast_util.rs b/src/libsyntax/ast_util.rs index 1a4b41404be..cc586a3affa 100644 --- a/src/libsyntax/ast_util.rs +++ b/src/libsyntax/ast_util.rs @@ -349,12 +349,20 @@ pub trait IdVisitingOperation { /// A visitor that applies its operation to all of the node IDs /// in a visitable thing. +#[cfg(stage0)] pub struct IdVisitor<'a, O> { pub operation: &'a O, pub pass_through_items: bool, pub visited_outermost: bool, } +#[cfg(not(stage0))] +pub struct IdVisitor<'a, O:'a> { + pub operation: &'a O, + pub pass_through_items: bool, + pub visited_outermost: bool, +} + impl<'a, O: IdVisitingOperation> IdVisitor<'a, O> { fn visit_generics_helper(&self, generics: &Generics) { for type_parameter in generics.ty_params.iter() { -- cgit 1.4.1-3-g733a5