// extract lifetimes in input argument types
for arg in &func.inputs {
walk_ty(&mut input_visitor, &arg.ty);
+ if let TyRptr(None, _) = arg.ty.node {
+ input_visitor.record(&None);
+ }
}
// extract lifetimes in output type
if let Return(ref ty) = func.output {
fn visit_lifetime(&mut self, lifetime: &'v Lifetime) {
self.record(&Some(*lifetime));
}
+
+ fn visit_ty(&mut self, ty: &'v Ty) {
+ if let TyRptr(None, _) = ty.node {
+ self.record(&None);
+ }
+ walk_ty(self, ty);
+ }
}
/// Are any lifetimes mentioned in the `where` clause? If yes, we don't try to