Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix chained negation generating prefix decrement operators incorrectly #3

Closed
wants to merge 15 commits into from

Conversation

ErichDonGubler
Copy link
Owner

@ErichDonGubler ErichDonGubler commented Oct 14, 2022

Resolves gfx-rs#2088. Depends on gfx-rs#2087.

TODO:

@ErichDonGubler ErichDonGubler self-assigned this Oct 14, 2022
@ErichDonGubler ErichDonGubler changed the title Fix chained negation generating prefix decrement operators incorrectly WIP: Fix chained negation generating prefix decrement operators incorrectly Oct 14, 2022
@ErichDonGubler ErichDonGubler changed the title WIP: Fix chained negation generating prefix decrement operators incorrectly Fix chained negation generating prefix decrement operators incorrectly Oct 17, 2022
cwfitzgerald and others added 6 commits October 20, 2022 01:37
* Fix incorrect atomic bounds check on metal back-end

Generalize put_atomic_fetch to handle `exchange` as well, rather than special-cased code which didn't do the bounds check (the check handling as fixed in gfx-rs#1703 but only for the fetch cases, exchange was skipped).

Fixes gfx-rs#1848

* Add tests for atomic exchange
* build: move to the Rust 2021 edition

Since the MSRV of `naga` [is currently 1.56][msrv], I don't think there's a strong reason to stay
with the 2018 edition, and there _are_ a [few good reasons][edition-guide] to move to the 2021
edition.

I did this migration mostly automatically, per [official Rust guidelines]:

```sh
$ cargo fix --edition --all-targets
$ sed -i Cargo.toml 's/2018/2021'
$ cargo fix --edition-idioms --allow-dirty # doesn't change anything
```

The only manual edit needed to stymie a new warning introduced was the removal of the `TryFrom`
import in several modules, since it's now in the 2021 prelude.

[msrv]: https://github.com/gfx-rs/naga/blob/a7193d652e49180661a6ca047889e0685667acdb/.github/workflows/pipeline.yml#L14
[edition-guide]: https://doc.rust-lang.org/edition-guide/rust-2021/index.html
[official Rust guidelines]: https://doc.rust-lang.org/cargo/commands/cargo-fix.html#edition-migration

* refactor(wgsl-in): use `pat` instead of `pat_param` again

How we were using `pat` in the Rust 2018 edition is actually the use case that
Rust 2021's `pat` fragment specifier is intended to satisfy. So, let's just use
that!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants