Use SmallVec in SwitchTargets
This allows building common SwitchTargets (eg. for `if`s) without allocation.
This commit is contained in:
parent
432535da2b
commit
9a47f74bfe
5 changed files with 14 additions and 15 deletions
|
@ -196,7 +196,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
mut bx: Bx,
|
||||
discr: &mir::Operand<'tcx>,
|
||||
switch_ty: Ty<'tcx>,
|
||||
targets: &SwitchTargets<'tcx>,
|
||||
targets: &SwitchTargets,
|
||||
) {
|
||||
let discr = self.codegen_operand(&mut bx, &discr);
|
||||
// `switch_ty` is redundant, sanity-check that.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue