Skip to content

Add assert_matches crate#11

Merged
Turbo87 merged 1 commit into
mainfrom
assert_matches
Jun 23, 2026
Merged

Add assert_matches crate#11
Turbo87 merged 1 commit into
mainfrom
assert_matches

Conversation

@Turbo87

@Turbo87 Turbo87 commented Jun 16, 2026

Copy link
Copy Markdown
Member

The assert_matches!() and debug_assert_matches!() macros are in std since Rust 1.96, covering the crate's assert-a-value-matches-a-pattern use (with optional guard and custom message). The crate's => arm form, which yields a value or runs extra assertions on the bindings, has no std equivalent, so this is flagged as a partial replacement.

@murarth 👋 does this seem accurate to you? any objections? (see rust-lang/crates.io#13855 for more information)

@Turbo87
Turbo87 merged commit 70e7517 into main Jun 23, 2026
2 checks passed
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.

1 participant