From 1689c56ee3674518b258287e5f7cd00811d0ec76 Mon Sep 17 00:00:00 2001 From: Andy Leiserson Date: Fri, 22 Aug 2025 10:05:44 -0700 Subject: [PATCH] refactor(naga): use explicit `\x20` in error output instead of trailing spaces --- naga/tests/naga/wgsl_errors.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/naga/tests/naga/wgsl_errors.rs b/naga/tests/naga/wgsl_errors.rs index c8d7b3316..a874112aa 100644 --- a/naga/tests/naga/wgsl_errors.rs +++ b/naga/tests/naga/wgsl_errors.rs @@ -2112,7 +2112,7 @@ error: type mismatch for reject and accept values in `select` call │ 5 │ _ = select(true, 1, false); │ ^^^^ ^ accept value of type `{AbstractInt}` - │ │ + │ │\x20\x20\x20\x20\x20\x20 │ reject value of type `bool` ", @@ -3488,19 +3488,19 @@ fn inconsistent_type() { "fn foo() -> f32 { return dot(vec4(), vec3()); }", - r#"error: inconsistent type passed as argument #2 to `dot` + "error: inconsistent type passed as argument #2 to `dot` ┌─ wgsl:2:20 │ 2 │ return dot(vec4(), vec3()); │ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ argument #2 has type vec3 - │ │ + │ │\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20 │ this argument has type vec4, which constrains subsequent arguments │ = note: Because argument #1 has type vec4, only the following types = note: (or types that automatically convert to them) are accepted for argument #2: = note: allowed type: vec4 -"#, +", ); }