Skip to content

Conversation

@ada4a
Copy link
Contributor

@ada4a ada4a commented Sep 6, 2025

Fixes #13357

Determining the exact placement of the if !to_ref_ty.is_sized()s required meticulously constructing the suggestion/truth table of is_sized, msrv.meets and has_erased_regions. The test cases should hopefully cover all the new combinations.

changelog: [transmute_ptr_to_ref]: don't suggest .cast when to-type is DST

- if-else reordering: having one fewer nesting levels makes it easier to
understand imo
@rustbot
Copy link
Collaborator

rustbot commented Sep 6, 2025

r? @dswij

rustbot has assigned @dswij.
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 Sep 6, 2025
Copy link
Member

@dswij dswij left a comment

Choose a reason for hiding this comment

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

@dswij dswij added this pull request to the merge queue Sep 17, 2025
Merged via the queue into rust-lang:master with commit f37b9c0 Sep 17, 2025
11 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Sep 17, 2025
@ada4a ada4a deleted the transmute_ptr_to_ref branch September 17, 2025 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

transmute_ptr_to_ref wrongly suggests to use cast when the destination type is a DST

3 participants