-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Fix ICE caused by Drop implementations for unsized types #26759
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
Conversation
r? @pnkfelix (rust_highfive has picked a reviewer for you, use r? to override) |
struct Wrapper<T: ?Sized>(T); | ||
|
||
impl<T: ?Sized> Drop for Wrapper<T> { | ||
fn drop(&mut self) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check that the destructor is really called correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went for a check that uses a pointer stored in the struct, to make sure that drop()
is called with the right arguments.
r=me once the test is expanded as described above. |
@bors r=pnkfelix |
📌 Commit eaeede2 has been approved by |
Fixes #26709