diff options
| author | pmk21 <prithvikrishna49@gmail.com> | 2020-03-31 15:49:27 +0530 |
|---|---|---|
| committer | pmk21 <prithvikrishna49@gmail.com> | 2020-03-31 15:49:27 +0530 |
| commit | ba6a3280f52c2ad6a6bec5e8792ecd0ce2006062 (patch) | |
| tree | e88c4b4a925d83d27ab0a42360277fd33f7960e8 | |
| parent | 1cac2f9e8601a952afa1c90c7b61c143108c3542 (diff) | |
| download | rust-ba6a3280f52c2ad6a6bec5e8792ecd0ce2006062.tar.gz rust-ba6a3280f52c2ad6a6bec5e8792ecd0ce2006062.zip | |
Added test for single_match in macro
| -rw-r--r-- | tests/ui/single_match.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/ui/single_match.rs b/tests/ui/single_match.rs index 980ce9a0fab..6766a6409b2 100644 --- a/tests/ui/single_match.rs +++ b/tests/ui/single_match.rs @@ -81,4 +81,13 @@ fn single_match_know_enum() { } } -fn main() {} +macro_rules! single_match { + ($num:literal) => { + match $num { + 15 => println!("15"), + _ => (), + } + }; +} + +fn main() {single_match!(5);} |
