This repository was archived by the owner on Feb 14, 2023. It is now read-only.
This repository was archived by the owner on Feb 14, 2023. It is now read-only.
Future incompatibility: trailing semicolon in macro used in expression position (currently nightly/beta-only) #23
Open
Description
rustc --version
: rustc 1.69.0-nightly (c18a5e8a5 2023-01-25)
cargo report future-incompatibilities --package [email protected]
after a build:
warning: trailing semicolon in macro used in expression position
--> /home/ltrlg/.cargo/registry/src/github.com-1ecc6299db9ec823/buf_redux-0.8.4/src/policy.rs:25:57
|
25 | ($val:expr) => ( return $crate::policy::DoRead($val); );
| ^
...
118 | if buffer.len() >= self.0 { do_read!(false) }
| --------------- in this macro invocation
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
= note: macro invocations at the end of a block are treated as expressions
= note: to ignore the value produced by the macro, add a semicolon after the invocation of `do_read`
= note: `#[allow(semicolon_in_expressions_from_macros)]` on by default
= note: this warning originates in the macro `do_read` (in Nightly builds, run with -Z macro-backtrace for more info)
Linked issue: rust-lang/rust#79813
According to rust-lang/rust#103418, the warning will come in stable 1.68 (2023-03-09).
Metadata
Metadata
Assignees
Labels
No labels