From 3df06f5083ef6c44e7f49f6520d62adc1f05aa58 Mon Sep 17 00:00:00 2001 From: Ryan <63398895+rwardd@users.noreply.github.com> Date: Sat, 3 Jan 2026 10:53:54 +1030 Subject: [PATCH] fix: use `std::num::NonZero` instead of `extern crate` and extend information in `CHECK-` directives Co-authored-by: scottmcm --- .../issues/multiple-option-or-permutations.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/codegen-llvm/issues/multiple-option-or-permutations.rs b/tests/codegen-llvm/issues/multiple-option-or-permutations.rs index b45402f28a3a..0ea7ef9a0f7e 100644 --- a/tests/codegen-llvm/issues/multiple-option-or-permutations.rs +++ b/tests/codegen-llvm/issues/multiple-option-or-permutations.rs @@ -3,16 +3,15 @@ #![crate_type = "lib"] -extern crate core; -use core::num::NonZero; +use std::num::NonZero; // CHECK-LABEL: @or_match_u8 // CHECK-SAME: (i1{{.+}}%0, i8 %1, i1{{.+}}%optb.0, i8 %optb.1) #[no_mangle] pub fn or_match_u8(opta: Option, optb: Option) -> Option { // CHECK: start: - // CHECK-DAG: or i1 %0 // CHECK-DAG: select i1 %0 + // CHECK-DAG: or i1 %0 // CHECK-NEXT: insertvalue { i1, i8 } // CHECK-NEXT: insertvalue { i1, i8 } // ret { i1, i8 } @@ -27,8 +26,8 @@ pub fn or_match_u8(opta: Option, optb: Option) -> Option { #[no_mangle] pub fn or_match_alt_u8(opta: Option, optb: Option) -> Option { // CHECK: start: - // CHECK-DAG: select i1 - // CHECK-DAG: or i1 + // CHECK-DAG: select i1 %opta.0, i8 %opta.1, i8 %optb.1 + // CHECK-DAG: or i1 {{%opta.0, %optb.0|%optb.0, %opta.0}} // CHECK-NEXT: insertvalue { i1, i8 } // CHECK-NEXT: insertvalue { i1, i8 } // ret { i1, i8 }