about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-05-29 05:41:04 +0000
committerbors <bors@rust-lang.org>2025-05-29 05:41:04 +0000
commit38081f22c2d7380f272aa1d7fa9b935637701c2d (patch)
treec9362dee5b3ee5ec78776315d284c6dd7ee06ff3 /compiler/rustc_pattern_analysis/src
parent5f025f363df11c65bd31ade9fe6f48fd4f4239af (diff)
parent4327a7c2027194f737f5336159ae15fd91cb6221 (diff)
downloadrust-38081f22c2d7380f272aa1d7fa9b935637701c2d.tar.gz
rust-38081f22c2d7380f272aa1d7fa9b935637701c2d.zip
Auto merge of #141716 - jhpratt:rollup-9bjrzfi, r=jhpratt
Rollup of 16 pull requests

Successful merges:

 - rust-lang/rust#136429 (GCI: At their def site, actually wfcheck the where-clause & always eval free lifetime-generic constants)
 - rust-lang/rust#138139 (Emit warning while outputs is not exe and prints linkage info)
 - rust-lang/rust#141104 (Test(fs): Fix `test_eq_windows_file_type` for Windows 7)
 - rust-lang/rust#141477 (Path::with_extension: show that it adds an extension where one did no…)
 - rust-lang/rust#141533 (clean up old rintf leftovers)
 - rust-lang/rust#141612 (Call out possibility of invariant result in variance markers)
 - rust-lang/rust#141638 (Use `builtin_index` instead of hand-rolling it)
 - rust-lang/rust#141643 (ci: verify that codebuild jobs use ghcr.io)
 - rust-lang/rust#141675 (Reorder `ast::ItemKind::{Struct,Enum,Union}` fields.)
 - rust-lang/rust#141680 (replace TraitRef link memory.md)
 - rust-lang/rust#141682 (interpret/allocation: Fixup type for `alloc_bytes`)
 - rust-lang/rust#141683 (Handle ed2021 precise capturing of unsafe binder)
 - rust-lang/rust#141684 (rustbook: Bump versions of `onig` and `onig_sys`)
 - rust-lang/rust#141687 (core: unstably expose atomic_compare_exchange so stdarch can use it)
 - rust-lang/rust#141690 (Add `rustc_diagnostic_item` to `sys::Mutex` methods)
 - rust-lang/rust#141702 (Add eholk to compiler reviewer rotation)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
-rw-r--r--compiler/rustc_pattern_analysis/src/rustc.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_pattern_analysis/src/rustc.rs b/compiler/rustc_pattern_analysis/src/rustc.rs
index d9f1888bfd9..46ced7500ea 100644
--- a/compiler/rustc_pattern_analysis/src/rustc.rs
+++ b/compiler/rustc_pattern_analysis/src/rustc.rs
@@ -249,12 +249,12 @@ impl<'p, 'tcx: 'p> RustcPatCtxt<'p, 'tcx> {
                 ty::Ref(_, rty, _) => reveal_and_alloc(cx, once(*rty)),
                 _ => bug!("Unexpected type for `Ref` constructor: {ty:?}"),
             },
-            Slice(slice) => match *ty.kind() {
-                ty::Slice(ty) | ty::Array(ty, _) => {
+            Slice(slice) => match ty.builtin_index() {
+                Some(ty) => {
                     let arity = slice.arity();
                     reveal_and_alloc(cx, (0..arity).map(|_| ty))
                 }
-                _ => bug!("bad slice pattern {:?} {:?}", ctor, ty),
+                None => bug!("bad slice pattern {:?} {:?}", ctor, ty),
             },
             DerefPattern(pointee_ty) => reveal_and_alloc(cx, once(pointee_ty.inner())),
             Bool(..) | IntRange(..) | F16Range(..) | F32Range(..) | F64Range(..)