change region inference to not consider & that appears in a fn

type as indicating region parameterization
This commit is contained in:
Niko Matsakis 2012-07-27 14:51:46 -07:00
parent 2407373fa4
commit 638491712e
2 changed files with 19 additions and 1 deletions

View file

@ -485,7 +485,16 @@ fn determine_rp_in_ty(ty: @ast::ty,
_ {}
}
visit::visit_ty(ty, cx, visitor);
alt ty.node {
ast::ty_fn(*) => {
do cx.with(cx.item_id, false) {
visit::visit_ty(ty, cx, visitor);
}
}
_ => {
visit::visit_ty(ty, cx, visitor);
}
}
}
fn determine_rp_in_crate(sess: session,