mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 03:03:40 +00:00
48 lines
693 B
Rust
48 lines
693 B
Rust
// 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)
|
|
};
|
|
}
|