_ => return None,
})
}
+
+ pub fn is_associated(&self) -> bool {
+ match *self {
+ ItemEnum::TypedefItem(_, _) |
+ ItemEnum::AssociatedTypeItem(_, _) => true,
+ _ => false,
+ }
+ }
}
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
ty::RePlaceholder(..) |
ty::ReEmpty |
ty::ReClosureBound(_) |
- ty::ReCanonical(_) |
ty::ReErased => None
}
}
ty::Closure(..) | ty::Generator(..) => Tuple(vec![]), // FIXME(pcwalton)
+ ty::Bound(..) => panic!("Bound"),
ty::UnnormalizedProjection(..) => panic!("UnnormalizedProjection"),
ty::GeneratorWitness(..) => panic!("GeneratorWitness"),
ty::Infer(..) => panic!("Infer"),