buf_redux
buf_redux copied to clipboard
Future incompatibility: trailing semicolon in macro used in expression position (currently nightly/beta-only)
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).
I also notice the same warning for rust 1.69 nightly version. This will be updated soon right?
Thanks,
Jianshu
LOL was just dropping by to report the same issue. :)
The package `buf_redux v0.8.4` currently triggers the following future incompatibility lints:
> warning: trailing semicolon in macro used in expression position
> --> /var/home/davidm/.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: `-A semicolon-in-expressions-from-macros` implied by `-A warnings`
> = note: this warning originates in the macro `do_read` (in Nightly builds, run with -Z macro-backtrace for more info)
Thank you.
Nobody is maintaining the repo right. I am wondering when this fix can be submitted to crates.io
Thank,
Jianshu
Please be patient, @abonander has plenty of time to notice before it becomes a problem:
- The breaking release of rustc is still far from today (the stable one enabling the warning is not even published).
- The fix will be semver-compatible with the latest published version of
buf_redux(no hard-to-plan migration across the dependents tree, justcargo updatewhen available on crates.io). - The fix is already available: people wanting the warning to stop displaying can use a Git dependency to #24 (or equivalent) until it is available on crates.io (I guess this should be fine at least for nightly/beta users).
@Ltrlg It really looks like this crate is unmaintained so moving away from buf_redux or forking the project to new name is better alternative than waiting anyone to merge fixes and release new version of this crate.
If you check this repository you see there's no reaction to any pull requests or open issues since 2019. My question about maintenance status of this crate has been unanswered in #22. I also posted issue to RustSec's advisory-db: https://github.com/rustsec/advisory-db/issues/1602