From d6332dcb5a625b1174f0ccf9003aa45d5f183d21 Mon Sep 17 00:00:00 2001 From: Dmitrii Vasilev Date: Sun, 18 Oct 2026 18:19:34 +0700 Subject: [PATCH] master red: tail.rs f64 case expects @trunc as the first refusal now that @floor/@ceil have f64 routines (Closes #10413) Co-Authored-By: Claude Opus 5.5 --- cli/t27b/tests/tail.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/t27b/tests/tail.rs b/cli/t27b/tests/tail.rs index 5c269d618d..056f2a92fa 100644 --- a/cli/t27b/tests/tail.rs +++ b/cli/t27b/tests/tail.rs @@ -344,12 +344,12 @@ fn a_comptime_int_rounds_in_float_from_int() { /// #7819: of an f32 they call libm.t27's ports of compiler_rt (`roundf` half away from zero, `fmodf` signed as the /// dividend), and `@rem`'s second operand takes the first one's type (specs/tri/t27b/libm_plan.t27). An f64 is refused -/// but by `@round` (#7923), so the first refusal there is `@floor`'s. +/// but by `@round` (#7923), `@floor` and `@ceil` (#10405), so the first refusal there is `@trunc`'s. #[test] fn f32_rounding_and_rem_call_their_ports() { let src = "module a;\n\nfn f(x: f32) -> f32 {\n return @round(x) + @floor(x) + @ceil(x) + @trunc(x) + @rem(x, 2.0);\n}\n\ntest t {\n assert(f(-2.5) == -10.5);\n}\n"; assert_eq!(names_ok(&run(src)), vec![("t", false, true)]); - for (from, to, what, why) in [("x: f32) -> f32", "x: f64) -> f64", "@floor", "no f64 routine"), ("@rem(x, 2.0)", "@rem(x)", "@rem", "`@rem` two")] { + for (from, to, what, why) in [("x: f32) -> f32", "x: f64) -> f64", "@trunc", "no f64 routine"), ("@rem(x, 2.0)", "@rem(x)", "@rem", "`@rem` two")] { let m = rejected(&src.replace(from, to)); assert!(m.contains(&format!("construct ExprCall({}) at line 4", what)) && m.contains(why), "{}", m); }