Skip to content

Commit 2c9e80c

Browse files
refactor(naga): improve diags. for unexpected scalars in pipeline_constants::map_value_to_literal
1 parent 4c97e16 commit 2c9e80c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

naga/src/back/pipeline_constants.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,10 @@ fn map_value_to_literal(value: f64, scalar: Scalar) -> Result<Literal, PipelineC
979979

980980
Ok(Literal::F64(value))
981981
}
982-
_ => unreachable!(),
982+
Scalar::ABSTRACT_FLOAT | Scalar::ABSTRACT_INT => {
983+
unreachable!("abstract values should not be validated out of override processing")
984+
}
985+
_ => unreachable!("unrecognized scalar type for override"),
983986
}
984987
}
985988

0 commit comments

Comments
 (0)