Closed
Description
Code in main crate:
#![warn(or_patterns_back_compat)]
#[macro_use] extern crate bar;
fn main() { foo!(_|); }
Crate bar
:
#[macro_export] macro_rules! foo { ($x:pat|) => {} }
Result:
$ cargo check
Checking bar v0.1.0 (/bar)
Checking test v0.1.0 (/test)
warning: the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro
--> /bar/src/lib.rs:1:37
|
1 | #[macro_export] macro_rules! foo { ($x:pat|) => {} }
| ^^^^^^ help: use pat_param to preserve semantics: `$x:pat_param`
|
note: the lint level is defined here
--> src/main.rs:1:9
|
1 | #![warn(or_patterns_back_compat)]
| ^^^^^^^^^^^^^^^^^^^^^^^
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition!
= note: for more information, see issue #84869 <https://github.com/rust-lang/rust/issues/84869>
warning: 1 warning emitted
Finished dev [unoptimized + debuginfo] target(s) in 0.19s
This lint should be suppressed, because it originates in another crate.
rustc --version
:rustc 1.55.0-nightly (6a758ea7e 2021-06-22)