Skip to content

assert_matches! output could be more consistent with std::assert_matches! #22

Description

@xtqqczze

The failure output from assertables::assert_matches! could be clearer.

Current output:

assertion failed: `assert_matches!(a)`
https://docs.rs/assertables/10.1.0/assertables/macro.assert_matches.html

This crate could perhaps be more consistent with std::assert_matches! in Rust 1.96, which uses output along the lines of:

assertion `left matches right` failed

Activity

  1. joelparkerhenderson commented on Jun 3, 2026

    @joelparkerhenderson
    Contributor

    The failure output from assertables::assert_matches! could be clearer.

    What would make the output clearer for you, separate from the consistency aspect?

    assertion left matches right failed

    When I talk with developers, most of them like having the link to the documentation.

    The notable exceptions are 1. developers who generate a lot of assertion failures in CI/CD who prefer shorter messages, 2. developers who work locally and want colorful ouput such as via pretty assertions, 3. developers who prefer structured default messages such as JSON output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions