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

Enable clippy::ref_as_ptr #12918

Merged
merged 3 commits into from
Apr 10, 2024
Merged

Enable clippy::ref_as_ptr #12918

merged 3 commits into from
Apr 10, 2024

Conversation

BD103
Copy link
Member

@BD103 BD103 commented Apr 10, 2024

Objective

Solution

  • Enable lint and fix all warnings.

BD103 added 2 commits April 10, 2024 08:42
I chose to ignore the lint in `bevy_mikktspace`, since it needs a refactor and I'd rather not touch it.
@BD103 BD103 added the C-Code-Quality A section of code that is hard to understand or change label Apr 10, 2024
@BD103
Copy link
Member Author

BD103 commented Apr 10, 2024

@tguichaoua, would you mind reviewing?

@BD103
Copy link
Member Author

BD103 commented Apr 10, 2024

I'm honestly unsure why CI is failing. It's definitely running Rust 1.77.2. I'm probably going to just fix the lint instead of digging into this further.

error: unknown lint: `clippy::ref_as_ptr`
 --> crates/bevy_mikktspace/src/lib.rs:6:5
  |
6 |     clippy::ref_as_ptr
  |     ^^^^^^^^^^^^^^^^^^ help: did you mean: `clippy::ptr_as_ptr`
  |
  = note: `-D unknown-lints` implied by `-D warnings`
  = help: to override `-D warnings` add `#[allow(unknown_lints)]`

CI was raising an error about `ref_as_ptr` being an unknown lint. Instead of trying to figure out what was going on, I instead opted to just fix the lint.
@mockersf mockersf added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Apr 10, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Apr 10, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 10, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Apr 10, 2024
Merged via the queue into bevyengine:main with commit 5c3ae32 Apr 10, 2024
32 checks passed
@BD103 BD103 deleted the ref_as_ptr branch April 10, 2024 21:01
@Brezak
Copy link
Contributor

Brezak commented Apr 16, 2024

This will need to be reverted. ref_as_ptr isn't in stable yet.
Disregard this. The warnings don't trigger CI failure.

@BD103
Copy link
Member Author

BD103 commented Apr 16, 2024

This will need to be reverted. ref_as_ptr isn't in stable yet.

Well that explains why I was getting this error earlier. I'm surprised CI doesn't complain about it in Cargo.toml, but does when used in #[allow(...)].

Unless it's giving someone issues locally, I think this can probably be kept.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Code-Quality A section of code that is hard to understand or change S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants