Skip to content

Conversation

@Abd002
Copy link

@Abd002 Abd002 commented Dec 10, 2025

Fix ref_as_ptr lint: ignore casts used to initialize const/static/let bindings and avoid linting temporary values.

  • Do not lint &STATIC_I32 as *const _ and &val as *const _ when used to initialize const/static/let.
  • Still lint other &T as *const U / &mut T as *mut U casts and suggest std::ptr::from_ref / from_mut.

@rustbot
Copy link
Collaborator

rustbot commented Dec 10, 2025

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. labels Dec 10, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 10, 2025

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@Kivooeo
Copy link
Member

Kivooeo commented Dec 10, 2025

The development of Clippy happens in its own repo - https://github.com/rust-lang/rust-clippy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants