rust/tests/ui/pattern/auxiliary/match_ergonomics_2024_macros.rs
Jules Bertholet 9d92a7f355
Match ergonomics 2024: migration lint
Unfortunately, we can't always offer a machine-applicable suggestion when there are subpatterns from macro expansion.

Co-Authored-By: Guillaume Boisseau <Nadrieril@users.noreply.github.com>
2024-05-12 11:13:33 -04:00

13 lines
377 B
Rust

//@ edition: 2024
//@ compile-flags: -Z unstable-options
// This contains a binding in edition 2024, so if matched with a reference binding mode it will end
// up with a `mut ref mut` binding mode. We use this to test the migration lint on patterns with
// mixed editions.
#[macro_export]
macro_rules! mixed_edition_pat {
($foo:ident) => {
Some(mut $foo)
};
}