Remove unnecessary bounds checks in vec::push_all (issue #2719)

Don't needlessly drop closures (issue #2603)
This commit is contained in:
Eric Holk 2012-06-27 11:32:22 -07:00
parent 404afcbb41
commit 133fdc1148
3 changed files with 51 additions and 14 deletions

View file

@ -1234,6 +1234,12 @@ fn type_needs_drop(cx: ctxt, ty: t) -> bool {
}
accum
}
ty_fn(fty) {
alt fty.proto {
proto_bare | proto_any | proto_block { false }
_ { true }
}
}
_ { true }
};