Sign in
rust
/
rust-lang
/
rust
/
refs/heads/stable
/
.
/
tests
/
ui
/
macros
/
auxiliary
/
foreign-crate-macro-pat.rs
blob: 1596f890bbba17b24ee78c38aa8ddcfdda7a2f80 [
file
] [
log
] [
blame
]
//@ edition:2018
#[
macro_export
]
macro_rules
!
custom_matches
{
(
$expression
:
expr
,
$
(
$pattern
:
pat
)|+
$
(
if
$guard
:
expr
)?
$
(,)?)
=>
{
match
$expression
{
$
(
$pattern
)|+
$
(
if
$guard
)?
=>
true
,
_
=>
false
}
}
}