Skip to content

switch Drop to &mut self #9244

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

Merged
merged 1 commit into from
Sep 17, 2013
Merged

switch Drop to &mut self #9244

merged 1 commit into from
Sep 17, 2013

Conversation

thestinger
Copy link
Contributor

This doesn't close any bugs as the goal is to convert the parameter to by-value, but this is a step towards being able to make guarantees about &T pointers (where T is Freeze) to LLVM.

@@ -187,7 +187,7 @@ impl UvEventLoop {
}

impl Drop for UvEventLoop {
fn drop(&self) {
fn drop(&mut self) {
// XXX: Need mutable finalizer
let this = unsafe {
transmute::<&UvEventLoop, &mut UvEventLoop>(self)
Copy link
Member

Choose a reason for hiding this comment

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

Seems this transmute is no longer necessary with this change? Also true for a lot of other lines below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, missed that one.

bors added a commit that referenced this pull request Sep 17, 2013
This doesn't close any bugs as the goal is to convert the parameter to by-value, but this is a step towards being able to make guarantees about `&T` pointers (where T is Freeze) to LLVM.
@bors bors closed this Sep 17, 2013
@bors bors merged commit 4e161a4 into rust-lang:master Sep 17, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jul 28, 2022
Fix ICE in `question_mark`

fixes rust-lang#9242
changelog: [`question_mark`](https://rust-lang.github.io/rust-clippy/master/#question_mark): Fix ICE on zero field tuple structs
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.

3 participants