diff options
| author | bors <bors@rust-lang.org> | 2022-06-06 16:09:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-06-06 16:09:54 +0000 |
| commit | 357bc27904d4a99c83d4b01272c34e0e54934fa5 (patch) | |
| tree | ebff2affafe86a6a42a39cc3881eb6f8af61fe88 /compiler/rustc_const_eval/src | |
| parent | 9d20fd109809f20c049d6895a5be27a1fbd39daa (diff) | |
| parent | 99afe260321680e09cb848180754953d4c1791d3 (diff) | |
| download | rust-357bc27904d4a99c83d4b01272c34e0e54934fa5.tar.gz rust-357bc27904d4a99c83d4b01272c34e0e54934fa5.zip | |
Auto merge of #97795 - Dylan-DPC:rollup-dxilagr, r=Dylan-DPC
Rollup of 5 pull requests Successful merges: - #97312 (Compute lifetimes in scope at diagnostic time) - #97495 (Add E0788 for improper #[no_coverage] usage) - #97579 (Avoid creating `SmallVec`s in `global_llvm_features`) - #97767 (interpret: do not claim UB until we looked more into variadic functions) - #97787 (E0432: rust 2018 -> rust 2018 or later in --explain message) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_const_eval/src')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/terminator.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/terminator.rs b/compiler/rustc_const_eval/src/interpret/terminator.rs index 10da2f803af..57d06b48ca4 100644 --- a/compiler/rustc_const_eval/src/interpret/terminator.rs +++ b/compiler/rustc_const_eval/src/interpret/terminator.rs @@ -353,12 +353,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { // FIXME: for variadic support, do we have to somehow determine callee's extra_args? let callee_fn_abi = self.fn_abi_of_instance(instance, ty::List::empty())?; - if callee_fn_abi.c_variadic != caller_fn_abi.c_variadic { - throw_ub_format!( - "calling a c-variadic function via a non-variadic call site, or vice versa" - ); - } - if callee_fn_abi.c_variadic { + if callee_fn_abi.c_variadic || caller_fn_abi.c_variadic { throw_unsup_format!("calling a c-variadic function is not supported"); } |
