Skip to content
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

Consistently use io error handlers #3990

Merged
merged 3 commits into from
Oct 25, 2024
Merged

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Oct 25, 2024

This cleans up the last, least obvious parts of #3930

Fixes #3930

if let Some(entry) = open_dir.entry {
this.deallocate_ptr(entry, None, MiriMemoryKind::Runtime.into())?;
}
drop(open_dir);
Copy link
Member

Choose a reason for hiding this comment

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

Is this drop actually doing anything? It'll be dropped anyway at the upcoming close brace, right?

Suggested change
drop(open_dir);

Copy link
Member Author

Choose a reason for hiding this comment

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

It may be intended to clarify that we own open_dir here... but it doesn't really achieve that to be fair.

@RalfJung RalfJung added this pull request to the merge queue Oct 25, 2024
Merged via the queue into rust-lang:master with commit 3db3f4b Oct 25, 2024
4 checks passed
@RalfJung RalfJung deleted the errno-cleanup branch October 25, 2024 15:10
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.

Consistently use io error handlers in Unix shims
2 participants