Skip to content

Ignore more pointer types in unnecessary_cast #10910

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

Merged
merged 1 commit into from
Jun 8, 2023

Conversation

Alexendoo
Copy link
Member

Spotted this because

let c_moo = b"Moooo\0";
let c_moo_ptr = c_moo.as_ptr() as *const c_char;

currently fails on aarch64-unknown-linux-gnu as c_char is u8 there

The current implementation checks for as alias, as _. This adds things like

  • as *const alias
  • as *const cfg_dependant
  • as *const _

changelog: none

@rustbot
Copy link
Collaborator

rustbot commented Jun 8, 2023

r? @llogiq

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jun 8, 2023
@llogiq
Copy link
Contributor

llogiq commented Jun 8, 2023

Thank you!

@bors r+

@bors
Copy link
Contributor

bors commented Jun 8, 2023

📌 Commit 4346c99 has been approved by llogiq

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jun 8, 2023

⌛ Testing commit 4346c99 with merge 384cf37...

@bors
Copy link
Contributor

bors commented Jun 8, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: llogiq
Pushing 384cf37 to master...

1 similar comment
@bors
Copy link
Contributor

bors commented Jun 8, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: llogiq
Pushing 384cf37 to master...

@bors bors merged commit 384cf37 into rust-lang:master Jun 8, 2023
@Alexendoo Alexendoo deleted the unnecessary-pointer-casts branch June 8, 2023 19:59
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants