Skip to content

Conversation

ada4a
Copy link
Contributor

@ada4a ada4a commented Aug 13, 2025

this could arguably be 2 separate PRs, but both of these were brought up in the same issue, so..

fixes #15398

  • I'm a bit doubtful about the last commit -- see the message for my reasoning and do let me know whether it's right.

changelog: [borrow_as_ptr]: don't lint inside proc-macros
changelog: [ptr_as_ptr]: don't lint inside proc-macros

@rustbot
Copy link
Collaborator

rustbot commented Aug 13, 2025

r? @Jarcho

rustbot has assigned @Jarcho.
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

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 13, 2025
@ada4a ada4a force-pushed the borrow-and-ptr-as-ptr branch from dd2d448 to 0470d0f Compare August 13, 2025 17:35
@ada4a ada4a mentioned this pull request Aug 13, 2025
Copy link
Contributor

@Jarcho Jarcho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last commit is not correct. is_from_proc_macro is actually broken and doesn't account for macro variables at all. I would just revert that change and leave a FIXME note in it's place.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Aug 15, 2025
Copy link
Contributor

@Jarcho Jarcho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Can you just squash the last three commits down please.

notice that this stops `inline!` from working as well
@ada4a ada4a force-pushed the borrow-and-ptr-as-ptr branch from 03a39ec to 9570ed8 Compare August 15, 2025 12:05
@ada4a
Copy link
Contributor Author

ada4a commented Aug 15, 2025

done!

@ada4a ada4a changed the title {borrow,ptr}_as_ptr {borrow,ptr}_as_ptr: don't lint inside proc-macros Aug 15, 2025
@Jarcho Jarcho added this pull request to the merge queue Aug 15, 2025
Merged via the queue into rust-lang:master with commit 9563a5c Aug 15, 2025
13 checks passed
@ada4a ada4a deleted the borrow-and-ptr-as-ptr branch August 15, 2025 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

borrow_as_ptr and ptr_as_ptr false positives in windows::core::implement macro invocation
3 participants