Skip to content

Conversation

workingjubilee
Copy link
Member

@workingjubilee workingjubilee commented Sep 23, 2025

With 1.90 being released, the stable - 2 policy now means 1.88 is fair game and we can use let-chains in the code. As we have lots of parsing code, this is a significant improvement. However, first, we have to also update to edition 2024. I have left out let-chain improvements from this PR to make it tractable to review.

Due to the somewhat adventuresome nature of updating the edition, this also includes cleaning up the win32 implementation a fair deal. Mostly this is the obvious unsafe-wrapping. That itself has been mostly split out to #735, modulo one unsafe block that turned out to be required after #737.

@workingjubilee
Copy link
Member Author

down to "only" fixing 32bit Windows unsafety

@workingjubilee workingjubilee force-pushed the edition-2024-cleanup branch 2 times, most recently from 96ee90e to 21c02bd Compare September 23, 2025 22:59
@workingjubilee
Copy link
Member Author

note re: timing, it is possible another MSRV 1.82 release should land first.

@workingjubilee workingjubilee force-pushed the edition-2024-cleanup branch 2 times, most recently from 88970de to eb7f722 Compare September 25, 2025 22:46
@workingjubilee workingjubilee changed the title edition 2024, MSRV 1.88, let-chain cleanup edition 2024 and raise MSRV to 1.88 Sep 25, 2025
@ChrisDenton
Copy link
Member

Could you rebase on master? Github's diff seems to be confused.

@workingjubilee
Copy link
Member Author

Done! It probably had trouble identifying the commits as being the same contentfully.

Copy link
Member

@ChrisDenton ChrisDenton left a comment

Choose a reason for hiding this comment

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

Thanks!

@ChrisDenton ChrisDenton merged commit f2bcf65 into rust-lang:master Sep 26, 2025
40 checks passed
Comment on lines +248 to +249
// SAFETY: Name must be initialized by SymFromAddrW, but we only interact with it as a pointer anyways.
let name_ptr = unsafe { (&raw const (*info).Name).cast::<u16>() };
Copy link
Member Author

Choose a reason for hiding this comment

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

I removed this unsafe block during my post-push editing of #737 because I thought the compiler said it was superfluous, but now it is required for reasons that aren't clear to me.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I wondered about that but I trusted the compiler to complain if it's not needed, ha.

Copy link
Member Author

Choose a reason for hiding this comment

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

I may need to poke at this a bit more if it's an edition-based unsafety difference: that shouldn't really be the case. It could have just been human confusion on my end though.

Copy link
Member Author

Choose a reason for hiding this comment

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

...I identified the diff in question removed deny(unsafe_op_in_unsafe_fn) as well as the unsafe block, so there is no edition-based problem aside from the lint being enabled or not.

@workingjubilee workingjubilee deleted the edition-2024-cleanup branch September 26, 2025 18:36
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.

2 participants