[naga wgsl-out] Include the i suffix on i32 literals.#4863
Merged
teoxoy merged 2 commits intogfx-rs:trunkfrom Dec 12, 2023
Merged
[naga wgsl-out] Include the i suffix on i32 literals.#4863teoxoy merged 2 commits intogfx-rs:trunkfrom
i suffix on i32 literals.#4863teoxoy merged 2 commits intogfx-rs:trunkfrom
Conversation
Without the suffix, `Expression::Literal(Literal::I32)` expressions get written without any suffix on the decimal number, meaning that they get re-parsed as AbstractInt values. In theory, this should always be fine, but since we don't actually support abstract types yet in all the places we should, having them appear in the output causes validation problems.
c1d1f6e to
955cc65
Compare
teoxoy
approved these changes
Dec 12, 2023
jimblandy
added a commit
to jimblandy/wgpu
that referenced
this pull request
Dec 12, 2023
Without the suffix, `Expression::Literal(Literal::F32)` expressions get written without any suffix on the number, meaning that they get re-parsed as `AbstractFloat` values. In theory, this should always be fine, but since we don't actually support abstract types yet in all the places we should, having them appear in the output causes validation problems. See also: gfx-rs#4863, which did the same for `i32` literals.
4 tasks
jimblandy
added a commit
to jimblandy/wgpu
that referenced
this pull request
Dec 12, 2023
Without the suffix, `Expression::Literal(Literal::F32)` expressions get written without any suffix on the number, meaning that they get re-parsed as `AbstractFloat` values. In theory, this should always be fine, but since we don't actually support abstract types yet in all the places we should, having them appear in the output causes validation problems. See also: gfx-rs#4863, which did the same for `i32` literals.
teoxoy
pushed a commit
that referenced
this pull request
Dec 13, 2023
Without the suffix, `Expression::Literal(Literal::F32)` expressions get written without any suffix on the number, meaning that they get re-parsed as `AbstractFloat` values. In theory, this should always be fine, but since we don't actually support abstract types yet in all the places we should, having them appear in the output causes validation problems. See also: #4863, which did the same for `i32` literals.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Without the suffix,
Expression::Literal(Literal::I32)expressions get written without any suffix on the decimal number, meaning that they get re-parsed as AbstractInt values. In theory, this should always be fine, but since we don't actually support abstract types yet in all the places we should, having them appear in the output causes validation problems.Checklist
cargo fmt.cargo clippy.cargo xtask testto run tests.CHANGELOG.md. See simple instructions inside file.