Skip to content

Commit be16f8c

Browse files
andyleisersonjimblandy
authored andcommitted
Use ty.for_debug
1 parent d223bb5 commit be16f8c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

naga/src/proc/typifier.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,8 @@ impl<'a> ResolveContext<'a> {
614614
TypeResolution::Value(bool)
615615
} else {
616616
return Err(ResolveError::IncompatibleOperands(format!(
617-
"{op:?}({ty:?}, _)"
617+
"{op:?}({:?}, _)",
618+
ty.for_debug(types),
618619
)));
619620
}
620621
}

naga/tests/naga/wgsl_errors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3185,7 +3185,7 @@ fn vector_logical_ops() {
31853185
"fn foo(a: vec2<bool>, b: vec2<bool>) {
31863186
let y = a && b;
31873187
}",
3188-
r#"error: Incompatible operands: LogicalAnd(Vector { size: Bi, scalar: Scalar { kind: Bool, width: 1 } }, _)
3188+
r#"error: Incompatible operands: LogicalAnd(vec2<bool>, _)
31893189
31903190
"#,
31913191
);
@@ -3194,7 +3194,7 @@ fn vector_logical_ops() {
31943194
"fn foo(a: vec2<bool>, b: vec2<bool>) {
31953195
let y = a || b;
31963196
}",
3197-
r#"error: Incompatible operands: LogicalOr(Vector { size: Bi, scalar: Scalar { kind: Bool, width: 1 } }, _)
3197+
r#"error: Incompatible operands: LogicalOr(vec2<bool>, _)
31983198
31993199
"#,
32003200
);

0 commit comments

Comments
 (0)