Remove unnecessary bounds checks in vec::push_all (issue #2719)
Don't needlessly drop closures (issue #2603)
This commit is contained in:
parent
404afcbb41
commit
133fdc1148
3 changed files with 51 additions and 14 deletions
|
|
@ -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 }
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue