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

Satisfy Rust 1.78's latest easy lints #5651

Merged
merged 5 commits into from May 13, 2024

Conversation

ErichDonGubler
Copy link
Member

@ErichDonGubler ErichDonGubler commented May 2, 2024

Connections
Link to the issues addressed by this PR, or dependent PRs in other repositories

Description
Describe what problem this is solving, and how it's solved.

This hopefully helps some eventual migration we'll do when we set the MSRV to Rust 1.78 or greater.

Testing
Explain how this change is tested.

CI FTW!

Checklist

  • Run cargo fmt.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown
    • --target wasm32-unknown-emscripten
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. See simple instructions inside file. I don't think we need this.

@ErichDonGubler ErichDonGubler self-assigned this May 2, 2024
@ErichDonGubler ErichDonGubler changed the title Satisfy Rust 1.78's latest lints Satisfy Rust 1.78's latest easy lints May 2, 2024
@ErichDonGubler ErichDonGubler marked this pull request as ready for review May 2, 2024 20:14
@ErichDonGubler ErichDonGubler requested review from a team as code owners May 2, 2024 20:14
@ErichDonGubler ErichDonGubler enabled auto-merge (rebase) May 2, 2024 20:14
@cwfitzgerald
Copy link
Member

Any reason not to make the repo msrv 1.78?

@ErichDonGubler
Copy link
Member Author

@cwfitzgerald: Mostly because Firefox's current MSRV is 1.76.0, and I'm not sure that I'd want to go up to bat for bumping the MSRV in mozilla-central every time we run into new lints. 😅

@Wumpf
Copy link
Member

Wumpf commented May 2, 2024

I'm also a bit wary of going with the latest right away on a library like wgpu. There's been bugfixes to a bunch of rust versions and it would be unfortunate to force users onto a new rust version too early

@cwfitzgerald
Copy link
Member

cwfitzgerald commented May 2, 2024

Context: Strong opinion weekly held, etc

@ErichDonGubler we have separate MSRVs for the repository as a whole and core/hal/types/naga - as long as the changes introduced by clippy don't cause the code to break on the lower msrvs (which we have a CI job to test) we can keep our repo msrv wherever we want.

@Wumpf counterpoint, no one is going to see this version of wgpu until at least 1.80 is out

Would just be nice to enforce these things in CI instead of sporadically

@Wumpf
Copy link
Member

Wumpf commented May 3, 2024

Good counterpoint!

Since you bring up keeping ci at a different version:
I also would like to get new lints checked locally right away, but it would be super annoying to do a thing that works locally and then get told off by ci because it operates with a different Rust version. Also it means that it can happen that I check out trunk and it has warnings on a local machine from the get go.

@cwfitzgerald
Copy link
Member

Since you bring up keeping ci at a different version:
I also would like to get new lints checked locally right away, but it would be super annoying to do a thing that works locally and then get told off by ci because it operates with a different Rust version. Also it means that it can happen that I check out trunk and it has warnings on a local machine from the get go.

I was suggesting bumping the repo msrv, which includes both the toolchain.toml and CI versions so local always == CI.

@ErichDonGubler
Copy link
Member Author

@cwfitzgerald: My only hesitation is when Clippy eagerly recommends something that only a newer version of Rust can do. I can't remember the concrete example ATM, but I remember this happening sometime in the last year or so.

@ErichDonGubler
Copy link
Member Author

Just waiting on @gfx-rs/naga here. Maybe @teoxoy could rubber-stamp? 😀

Copy link
Member

@teoxoy teoxoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@ErichDonGubler ErichDonGubler merged commit ca91744 into gfx-rs:trunk May 13, 2024
27 checks passed
@MarijnS95 MarijnS95 mentioned this pull request May 13, 2024
6 tasks
@ErichDonGubler ErichDonGubler deleted the rust-1.78 branch May 13, 2024 18:53
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.

None yet

4 participants