Implement generalized object and type parameter bounds (Fixes #16462)

This commit is contained in:
Niko Matsakis 2014-08-27 21:46:52 -04:00
parent 3ee047ae1f
commit 1b487a8906
272 changed files with 6783 additions and 3154 deletions

View file

@ -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() {