about summary refs log tree commit diff
path: root/tests/ui/macros/assert-matches-macro-msg.rs
blob: 956bc9cf0f49b9f76cd1b873f31684c46249f1f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//@ run-fail
//@ error-pattern:assertion `left matches right` failed: 1 + 1 definitely should be 3
//@ error-pattern:  left: 2
//@ error-pattern: right: 3
//@ needs-subprocess

#![feature(assert_matches)]

use std::assert_matches::assert_matches;

fn main() {
    assert_matches!(1 + 1, 3, "1 + 1 definitely should be 3");
}