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

Migrate to Rust 1.65 #3184

Merged
merged 10 commits into from
Nov 8, 2022
Merged

Migrate to Rust 1.65 #3184

merged 10 commits into from
Nov 8, 2022

Conversation

ErichDonGubler
Copy link
Member

Checklist

  • Run cargo clippy.
  • Run RUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy --target wasm32-unknown-unknown if applicable.
  • Add change to CHANGELOG.md. See simple instructions inside file. Opting not to do this, unless somebody thinks it's actually interesting for downstream.

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

None that I know of.

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

The Rust 1.65 toolchain has introduced several new lint warnings for this repository. Keep it clean by taking the most straightforward path for resolving lints. The only change that I think is controversial is the final change to appease clippy::result_large_err, which adds a .clippy.toml to set the lint threshold to right about our current largest case.

Recommended review experience: commit-by-commit.

Testing
Explain how this change is tested.

It still compiles, so we should be good to go!

wgpu-hal/src/dx12/device.rs Outdated Show resolved Hide resolved
@ErichDonGubler
Copy link
Member Author

Mmmm, looks like CI is failing because the large-error-threshold configuration I added to the new .clippy.toml is rejected in the Rust 1.64 toolchain. That means if we want to go with that solution, we'd effectively have to do it in lockstep with an upgrade to Rust 1.65. Would it be a problem to upgrade that here, too (changing the PR title, etc., OFC)? 🤔

@codecov-commenter
Copy link

codecov-commenter commented Nov 7, 2022

Codecov Report

Merging #3184 (98951ea) into master (6ed103e) will increase coverage by 0.00%.
The diff coverage is 77.27%.

@@           Coverage Diff           @@
##           master    #3184   +/-   ##
=======================================
  Coverage   64.73%   64.74%           
=======================================
  Files          81       81           
  Lines       38747    38748    +1     
=======================================
+ Hits        25084    25088    +4     
+ Misses      13663    13660    -3     
Impacted Files Coverage Δ
wgpu-core/src/device/mod.rs 66.31% <0.00%> (ø)
wgpu-hal/src/gles/adapter.rs 83.52% <0.00%> (ø)
wgpu-hal/src/vulkan/device.rs 75.25% <0.00%> (ø)
wgpu-hal/src/gles/egl.rs 37.95% <80.00%> (+0.12%) ⬆️
wgpu-core/src/hub.rs 60.67% <100.00%> (ø)
wgpu-hal/src/dx12/conv.rs 83.51% <100.00%> (ø)
wgpu-hal/src/dx12/device.rs 88.36% <100.00%> (+0.08%) ⬆️
wgpu-hal/src/dx12/descriptor.rs 88.05% <0.00%> (+0.49%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@ErichDonGubler ErichDonGubler changed the title Resolve latest (Rust 1.65) clippy lints Migrate to Rust 1.65 Nov 7, 2022
@ErichDonGubler
Copy link
Member Author

ErichDonGubler commented Nov 7, 2022

Per conversation in Matrix with @cwfitzgerald, I've pushed d1682f9 (upgrading to Rust 1.65) and renamed this PR. Will autosquash momentarily, after CI turns green.

Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

Small comment on one thing

wgpu-hal/src/dx12/conv.rs Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@jimblandy jimblandy merged commit 08b160c into gfx-rs:master Nov 8, 2022
@ErichDonGubler ErichDonGubler deleted the clippy branch November 8, 2022 14:50
@jimblandy jimblandy mentioned this pull request Nov 18, 2022
3 tasks
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