Skip to content

Commit e5e625e

Browse files
committed
[naga] Tweak comments in ConstantEvaluator::try_eval_and_append.
I found I needed a little bit more detail here.
1 parent 74c26a2 commit e5e625e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

naga/src/proc/constant_evaluator.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,10 @@ impl<'a> ConstantEvaluator<'a> {
713713
match self.expression_kind_tracker.type_of_with_expr(&expr) {
714714
ExpressionKind::Const => {
715715
let eval_result = self.try_eval_and_append_impl(&expr, span);
716-
// avoid errors on unimplemented functionality if possible
716+
// We should be able to evaluate `Const` expressions at this
717+
// point. If we failed to, then that probably means we just
718+
// haven't implemented that part of constant evaluation. Work
719+
// around this by simply emitting it as a run-time expression.
717720
if self.behavior.has_runtime_restrictions()
718721
&& matches!(
719722
eval_result,

0 commit comments

Comments
 (0)