Skip to content

Preempt unused_qualifications lints triggered in Rust 1.80#6147

Merged
ErichDonGubler merged 2 commits into
gfx-rs:trunkfrom
erichdongubler-mozilla:preempt-unused_qualification
Aug 23, 2024
Merged

Preempt unused_qualifications lints triggered in Rust 1.80#6147
ErichDonGubler merged 2 commits into
gfx-rs:trunkfrom
erichdongubler-mozilla:preempt-unused_qualification

Conversation

@ErichDonGubler

@ErichDonGubler ErichDonGubler commented Aug 23, 2024

Copy link
Copy Markdown
Member

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
@ErichDonGubler ErichDonGubler force-pushed the preempt-unused_qualification branch from b0b20f5 to beba516 Compare August 23, 2024 14:58
…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 force-pushed the preempt-unused_qualification branch from beba516 to d16aa8c Compare August 23, 2024 15:01
@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 mentioned this pull request Aug 23, 2024
1 task
@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
@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