Skip to content

Add scopeguard - #54

Merged
Turbo87 merged 1 commit into
rust-lang:mainfrom
syphar:scopeguard
Nov 28, 2026
Merged

Turbo87 merged 1 commit into
rust-lang:mainfrom
syphar:scopeguard

Conversation

@syphar

@syphar syphar commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

Rust 1.100 stabilizes core::mem::DropGuard, which covers the main use case of scopeguard: DropGuard::new replaces guard and defer!, and DropGuard::dismiss replaces ScopeGuard::into_inner.

This is a partial replacement: the OnSuccess/OnUnwind strategies have no std equivalent.

Per CONTRIBUTING.md, @bluss and @Amanieu, maintainers of scopeguard, should have the opportunity to comment.

Related: #55, #56

This was referenced Nov 27, 2026
@bluss

bluss commented Nov 28, 2026

Copy link
Copy Markdown

Looks good to me! 🙂

@Turbo87
Turbo87 merged commit 5deb4c9 into rust-lang:main Nov 28, 2026
3 checks passed
@syphar
syphar deleted the scopeguard branch November 28, 2026 20:07
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