diff options
| author | bors <bors@rust-lang.org> | 2024-08-12 16:31:22 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-08-12 16:31:22 +0000 |
| commit | 91376f416222a238227c84a848d168835ede2cc3 (patch) | |
| tree | 0dc7b9f6c09c2de39e702cb4751563c12b254835 /compiler/rustc_mir_transform/src | |
| parent | e08b80c0fb7667bdcd040761891701e576c42ec8 (diff) | |
| parent | 99a785d62d8414e5db435f4e699eabd185257d49 (diff) | |
| download | rust-91376f416222a238227c84a848d168835ede2cc3.tar.gz rust-91376f416222a238227c84a848d168835ede2cc3.zip | |
Auto merge of #129008 - GuillaumeGomez:rollup-6citttb, r=GuillaumeGomez
Rollup of 10 pull requests Successful merges: - #128149 (nontemporal_store: make sure that the intrinsic is truly just a hint) - #128394 (Unify run button display with "copy code" button and with mdbook buttons) - #128537 (const vector passed through to codegen) - #128632 (std: do not overwrite style in `get_backtrace_style`) - #128878 (Slightly refactor `Flags` in bootstrap) - #128886 (Get rid of some `#[allow(rustc::untranslatable_diagnostic)]`) - #128929 (Fix codegen-units tests that were disabled 8 years ago) - #128937 (Fix warnings in rmake tests on `x86_64-unknown-linux-gnu`) - #128978 (Use `assert_matches` around the compiler more) - #128994 (Fix bug in `Parser::look_ahead`.) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_mir_transform/src')
| -rw-r--r-- | compiler/rustc_mir_transform/src/promote_consts.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_mir_transform/src/shim.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_mir_transform/src/promote_consts.rs b/compiler/rustc_mir_transform/src/promote_consts.rs index dc8e50ac8cd..48a3266ae6f 100644 --- a/compiler/rustc_mir_transform/src/promote_consts.rs +++ b/compiler/rustc_mir_transform/src/promote_consts.rs @@ -468,7 +468,7 @@ impl<'tcx> Validator<'_, 'tcx> { if let ty::RawPtr(_, _) | ty::FnPtr(..) = lhs_ty.kind() { // Raw and fn pointer operations are not allowed inside consts and thus not promotable. - assert!(matches!( + assert_matches!( op, BinOp::Eq | BinOp::Ne @@ -477,7 +477,7 @@ impl<'tcx> Validator<'_, 'tcx> { | BinOp::Ge | BinOp::Gt | BinOp::Offset - )); + ); return Err(Unpromotable); } diff --git a/compiler/rustc_mir_transform/src/shim.rs b/compiler/rustc_mir_transform/src/shim.rs index f41f3ef656c..29185e79bce 100644 --- a/compiler/rustc_mir_transform/src/shim.rs +++ b/compiler/rustc_mir_transform/src/shim.rs @@ -996,7 +996,7 @@ pub fn build_adt_ctor(tcx: TyCtxt<'_>, ctor_id: DefId) -> Body<'_> { /// } /// ``` fn build_fn_ptr_addr_shim<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, self_ty: Ty<'tcx>) -> Body<'tcx> { - assert!(matches!(self_ty.kind(), ty::FnPtr(..)), "expected fn ptr, found {self_ty}"); + assert_matches!(self_ty.kind(), ty::FnPtr(..), "expected fn ptr, found {self_ty}"); let span = tcx.def_span(def_id); let Some(sig) = tcx.fn_sig(def_id).instantiate(tcx, &[self_ty.into()]).no_bound_vars() else { span_bug!(span, "FnPtr::addr with bound vars for `{self_ty}`"); |
