]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_codegen_llvm/src/intrinsic.rs
Rollup merge of #81679 - GuillaumeGomez:clean-fixme-match-bind, r=poliorcetics,CraftS...
[rust.git] / compiler / rustc_codegen_llvm / src / intrinsic.rs
index ec557b7a682ea6906b1e96a15f8ac820540198d2..bf0d499e6c4919b433095c08e9e41dc716301c9f 100644 (file)
@@ -854,8 +854,8 @@ macro_rules! require_simd {
         ));
     }
 
-    if name_str.starts_with("simd_shuffle") {
-        let n: u64 = name_str["simd_shuffle".len()..].parse().unwrap_or_else(|_| {
+    if let Some(stripped) = name_str.strip_prefix("simd_shuffle") {
+        let n: u64 = stripped.parse().unwrap_or_else(|_| {
             span_bug!(span, "bad `simd_shuffle` instruction only caught in codegen?")
         });