1
Fork 0

Enable CopyProp by default, tune the impl a bit

This commit is contained in:
Ben Kimock 2023-01-29 13:50:33 -05:00
parent 8dabf5da9e
commit 640ede7b0a
14 changed files with 248 additions and 174 deletions

View file

@ -406,6 +406,7 @@ impl<'tcx> AdtDef<'tcx> {
}
/// Return the index of `VariantDef` given a variant id.
#[inline]
pub fn variant_index_with_id(self, vid: DefId) -> VariantIdx {
self.variants()
.iter_enumerated()