add tests for macro!(/* comment */) (#2592)

* add tests
This commit is contained in:
Ryan Leung 2018-04-04 10:02:01 +08:00 committed by Seiichi Uchida
parent 2e7d1a1184
commit 2c7e737a06
2 changed files with 24 additions and 0 deletions

View File

@ -347,3 +347,15 @@ macro lex_err($kind: ident $(, $body: expr)*) {
// Preserve trailing comma on item-level macro with `()` or `[]`.
methods![ get, post, delete, ];
methods!( get, post, delete, );
// #2591
fn foo() {
match 0u32 {
0 => (),
_ => unreachable!(/* obviously */),
}
}
fn foo() {
let _ = column!(/* here */);
}

View File

@ -922,3 +922,15 @@ macro lex_err($kind: ident $(, $body: expr)*) {
// Preserve trailing comma on item-level macro with `()` or `[]`.
methods![get, post, delete,];
methods!(get, post, delete,);
// #2591
fn foo() {
match 0u32 {
0 => (),
_ => unreachable!(/* obviously */),
}
}
fn foo() {
let _ = column!(/* here */);
}