Open
Conversation
This comment has been minimized.
This comment has been minimized.
c428102 to
5bd5888
Compare
This comment has been minimized.
This comment has been minimized.
theemathas
reviewed
Dec 4, 2025
Comment on lines
187
to
192
| #[stable(feature = "manually_drop", since = "1.20.0")] | ||
| impl<T: ?Sized + PartialEq> PartialEq for ManuallyDrop<T> { | ||
| fn eq(&self, other: &Self) -> bool { | ||
| self.value.as_ref().eq(other.value.as_ref()) | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
You also need to implement StructuralPartialEq, since ManuallyDrop in a const can currently be used in patterns on stable.
Member
|
I don't know how much this is still an experiment, but if you're looking for more coverage, you might want to replace the rust/library/std/src/thread/lifecycle.rs Lines 61 to 82 in 864339a |
This comment has been minimized.
This comment has been minimized.
1648a31 to
82d6d20
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1b721b4 to
5bfe6e8
Compare
This comment has been minimized.
This comment has been minimized.
5bfe6e8 to
7f5f1b0
Compare
This comment has been minimized.
This comment has been minimized.
ac4154d to
259187e
Compare
This comment has been minimized.
This comment has been minimized.
96e0970 to
85e200f
Compare
This comment has been minimized.
This comment has been minimized.
85e200f to
c05b9a1
Compare
This comment has been minimized.
This comment has been minimized.
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Dec 15, 2025
…m, r=jdonszelmann Simplify how inline asm handles `MaybeUninit` This is just better, but this is also allows it to handle changes from rust-lang#149614 (i.e. `ManuallyDrop` containing `MaybeDangle`).
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Dec 15, 2025
…m, r=jdonszelmann Simplify how inline asm handles `MaybeUninit` This is just better, but this is also allows it to handle changes from rust-lang#149614 (i.e. `ManuallyDrop` containing `MaybeDangle`).
Zalathar
added a commit
to Zalathar/rust
that referenced
this pull request
Dec 16, 2025
…m, r=jdonszelmann Simplify how inline asm handles `MaybeUninit` This is just better, but this is also allows it to handle changes from rust-lang#149614 (i.e. `ManuallyDrop` containing `MaybeDangle`).
Zalathar
added a commit
to Zalathar/rust
that referenced
this pull request
Dec 16, 2025
…m, r=jdonszelmann Simplify how inline asm handles `MaybeUninit` This is just better, but this is also allows it to handle changes from rust-lang#149614 (i.e. `ManuallyDrop` containing `MaybeDangle`).
9f19633 to
01d80b9
Compare
This comment has been minimized.
This comment has been minimized.
Kobzol
pushed a commit
to Kobzol/rustc_codegen_cranelift
that referenced
this pull request
Dec 29, 2025
…szelmann Simplify how inline asm handles `MaybeUninit` This is just better, but this is also allows it to handle changes from rust-lang/rust#149614 (i.e. `ManuallyDrop` containing `MaybeDangle`).
christian-schilling
pushed a commit
to christian-schilling/rustc_codegen_cranelift
that referenced
this pull request
Jan 27, 2026
…szelmann Simplify how inline asm handles `MaybeUninit` This is just better, but this is also allows it to handle changes from rust-lang/rust#149614 (i.e. `ManuallyDrop` containing `MaybeDangle`).
christian-schilling
pushed a commit
to christian-schilling/rustc_codegen_cranelift
that referenced
this pull request
Jan 27, 2026
…szelmann Simplify how inline asm handles `MaybeUninit` This is just better, but this is also allows it to handle changes from rust-lang/rust#149614 (i.e. `ManuallyDrop` containing `MaybeDangle`).
3 tasks
This comment has been minimized.
This comment has been minimized.
01d80b9 to
0e28e56
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
0e28e56 to
34a1617
Compare
Member
Author
|
@rustbot reroll |
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Apr 6, 2026
…op-matching, r=JohnTitor implement `StructuralPartialEq` for `MaybeDangling` This fixes -- a stable-to-stable regression where constants of type `ManuallyDrop<T>` would not be allowed to be used as a pattern due to `MaybeDangling<T>` in `ManuallyDrop<T>` not implementing `StructuralPartialEq`. Fixes rust-lang#154890 I'm sorry, @theemathas, I forgot to address your [comment](rust-lang#149614 (comment)) 😭
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Apr 6, 2026
…op-matching, r=JohnTitor implement `StructuralPartialEq` for `MaybeDangling` This fixes -- a stable-to-stable regression where constants of type `ManuallyDrop<T>` would not be allowed to be used as a pattern due to `MaybeDangling<T>` in `ManuallyDrop<T>` not implementing `StructuralPartialEq`. Fixes rust-lang#154890 I'm sorry, @theemathas, I forgot to address your [comment](rust-lang#149614 (comment)) 😭
rust-timer
added a commit
that referenced
this pull request
Apr 7, 2026
Rollup merge of #154891 - WaffleLapkin:deregress-manually-drop-matching, r=JohnTitor implement `StructuralPartialEq` for `MaybeDangling` This fixes -- a stable-to-stable regression where constants of type `ManuallyDrop<T>` would not be allowed to be used as a pattern due to `MaybeDangling<T>` in `ManuallyDrop<T>` not implementing `StructuralPartialEq`. Fixes #154890 I'm sorry, @theemathas, I forgot to address your [comment](#149614 (comment)) 😭
34a1617 to
32cc8b1
Compare
Collaborator
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cc #118166