diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:50 +0000 |
commit | 2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35 (patch) | |
tree | d325add32978dbdc1db975a438b3a77d571b1ab8 /compiler/rustc_mir_build/src/build/expr/as_rvalue.rs | |
parent | Releasing progress-linux version 1.68.2+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.tar.xz rustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.zip |
Merging upstream version 1.69.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'compiler/rustc_mir_build/src/build/expr/as_rvalue.rs')
-rw-r--r-- | compiler/rustc_mir_build/src/build/expr/as_rvalue.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/compiler/rustc_mir_build/src/build/expr/as_rvalue.rs b/compiler/rustc_mir_build/src/build/expr/as_rvalue.rs index c7b3eb44d..a4e48c154 100644 --- a/compiler/rustc_mir_build/src/build/expr/as_rvalue.rs +++ b/compiler/rustc_mir_build/src/build/expr/as_rvalue.rs @@ -55,7 +55,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { }) } ExprKind::Repeat { value, count } => { - if Some(0) == count.try_eval_usize(this.tcx, this.param_env) { + if Some(0) == count.try_eval_target_usize(this.tcx, this.param_env) { this.build_zero_repeat(block, value, scope, source_info) } else { let value_operand = unpack!( @@ -439,10 +439,14 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { // We implicitly set the discriminant to 0. See // librustc_mir/transform/deaggregator.rs for details. let movability = movability.unwrap(); - Box::new(AggregateKind::Generator(closure_id, substs, movability)) + Box::new(AggregateKind::Generator( + closure_id.to_def_id(), + substs, + movability, + )) } UpvarSubsts::Closure(substs) => { - Box::new(AggregateKind::Closure(closure_id, substs)) + Box::new(AggregateKind::Closure(closure_id.to_def_id(), substs)) } }; block.and(Rvalue::Aggregate(result, operands)) @@ -516,7 +520,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { let source_info = self.source_info(span); let bool_ty = self.tcx.types.bool; if self.check_overflow && op.is_checkable() && ty.is_integral() { - let result_tup = self.tcx.intern_tup(&[ty, bool_ty]); + let result_tup = self.tcx.mk_tup(&[ty, bool_ty]); let result_value = self.temp(result_tup, span); self.cfg.push_assign( |