Skip to content

Commit

Permalink
Adding draft test cases for issue rust-lang#4603
Browse files Browse the repository at this point in the history
  • Loading branch information
davidBar-On committed Dec 30, 2020
1 parent 367a874 commit 4449d4a
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions tests/source/issue-4603.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// Formatting when original macro snippet is used

// Original issue #4603 code
#![feature(or_patterns)]
macro_rules! t_or_f {
() => {
(true // some comment
| false)
};
}

// Other test cases variations
macro_rules! RULES {
() => {
(
xxxxxxx // COMMENT
| yyyyyyy
)
};
}
macro_rules! RULES {
() => {
(xxxxxxx // COMMENT
| yyyyyyy)
};
}

fn main() {
macro_rules! RULES {
() => {
(xxxxxxx // COMMENT
| yyyyyyy)
};
}
}

macro_rules! RULES {
() => {
(xxxxxxx /* COMMENT */ | yyyyyyy)
};
}
macro_rules! RULES {
() => {
(xxxxxxx /* COMMENT */
| yyyyyyy)
};
}
Empty file added tests/target/issue-4603.rs
Empty file.

0 comments on commit 4449d4a

Please sign in to comment.