mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
14 lines
353 B
Rust
14 lines
353 B
Rust
// run-fail
|
|
// error-pattern:panicked at 'assertion failed: `(left matches right)`
|
|
// error-pattern: left: `2`
|
|
// error-pattern:right: `3`: 1 + 1 definitely should be 3'
|
|
// ignore-emscripten no processes
|
|
|
|
#![feature(assert_matches)]
|
|
|
|
use std::assert_matches::assert_matches;
|
|
|
|
fn main() {
|
|
assert_matches!(1 + 1, 3, "1 + 1 definitely should be 3");
|
|
}
|