diff --git a/tests/source/macros.rs b/tests/source/macros.rs index 64c468c8572..7ed3199d1ce 100644 --- a/tests/source/macros.rs +++ b/tests/source/macros.rs @@ -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 */); +} diff --git a/tests/target/macros.rs b/tests/target/macros.rs index 2730e8b0ca9..482423958da 100644 --- a/tests/target/macros.rs +++ b/tests/target/macros.rs @@ -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 */); +}