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

Preempt unused_qualifications lints triggered in Rust 1.80 #6147

Conversation

ErichDonGubler
Copy link
Member

@ErichDonGubler ErichDonGubler commented Aug 23, 2024

Connections

Broken out from #6105.

Description

Removes many warning emitted by the Rust 1.80 toolchain and newer.

Testing
Explain how this change is tested.

Things still compile and run!

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. Not necessary.

@ErichDonGubler ErichDonGubler added area: infrastructure Testing, building, coordinating issues kind: refactor Making existing function faster or nicer labels Aug 23, 2024
@ErichDonGubler ErichDonGubler self-assigned this Aug 23, 2024
…n Rust 1.80

`std::mem::{size,align}_of{,_val}` was added to `std::prelude` in Rust
1.80; see
[`rust`#123168](rust-lang/rust#123168).
However, we don't have an MSRV at 1.80 or higher yet. So, let's work
around it by importing these items fully. Since neither `clippy` nor
`rustc` lint against shadowed `prelude` items yet (see also a [proposed
`clippy` lint] for such), that lets us remove the explicit `std::mem::*`
imports later at our leisure.

[proposed `clippy` lint]: rust-lang/rust-clippy#8439
@ErichDonGubler ErichDonGubler changed the title Pre-empty unused_qualifications lints triggered in Rust 1.80 Preempt unused_qualifications lints triggered in Rust 1.80 Aug 23, 2024
@ErichDonGubler ErichDonGubler marked this pull request as ready for review August 23, 2024 19:08
@ErichDonGubler ErichDonGubler requested a review from a team as a code owner August 23, 2024 19:08
@ErichDonGubler ErichDonGubler merged commit fac49ee into gfx-rs:trunk Aug 23, 2024
27 checks passed
@ErichDonGubler ErichDonGubler deleted the preempt-unused_qualification branch August 23, 2024 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: infrastructure Testing, building, coordinating issues kind: refactor Making existing function faster or nicer
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants