]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/interpret/terminator.rs
Auto merge of #68952 - faern:stabilize-assoc-int-consts, r=dtolnay
[rust.git] / src / librustc_mir / interpret / terminator.rs
index 37dcab512b9918d65eb95f4fe02ddde69da3d72e..08d4ae34afbfa3dc8a65b045d4ebc003599d259d 100644 (file)
@@ -172,7 +172,7 @@ fn pass_argument(
         }
         let caller_arg = caller_arg.next().ok_or_else(|| err_unsup!(FunctionArgCountMismatch))?;
         if rust_abi {
-            debug_assert!(!caller_arg.layout.is_zst(), "ZSTs must have been already filtered out");
+            assert!(!caller_arg.layout.is_zst(), "ZSTs must have been already filtered out");
         }
         // Now, check
         if !Self::check_argument_compat(rust_abi, caller_arg.layout, callee_arg.layout) {
@@ -293,7 +293,7 @@ fn eval_fn_call(
                                 let (&untuple_arg, args) = args.split_last().unwrap();
                                 trace!("eval_fn_call: Will pass last argument by untupling");
                                 Cow::from(args.iter().map(|&a| Ok(a))
-                                .chain((0..untuple_arg.layout.fields.count()).into_iter()
+                                .chain((0..untuple_arg.layout.fields.count())
                                     .map(|i| self.operand_field(untuple_arg, i as u64))
                                 )
                                 .collect::<InterpResult<'_, Vec<OpTy<'tcx, M::PointerTag>>>>()?)
@@ -305,7 +305,7 @@ fn eval_fn_call(
                         let mut caller_iter = caller_args
                             .iter()
                             .filter(|op| !rust_abi || !op.layout.is_zst())
-                            .map(|op| *op);
+                            .copied();
 
                         // Now we have to spread them out across the callee's locals,
                         // taking into account the `spread_arg`.  If we could write