Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lalrpop triggers a future-incompat warning on Rust 1.69 #701

Closed
kleinesfilmroellchen opened this issue Jan 26, 2023 · 4 comments
Closed

Comments

@kleinesfilmroellchen
Copy link

When compiling a project including lalrpop with rustc 1.69.0-nightly (c8e6a9e8b 2023-01-23), a warning about future incompatibility is issued. The full report given by cargo report future-incompatibilities --id 10 --package lalrpop@0.19.8 is:

The following warnings were discovered during the build. These warnings are an
indication that the packages contain code that will become an error in a
future release of Rust. These warnings typically cover changes to close
soundness problems, unintended or undocumented behavior, or critical problems
that cannot be fixed in a backwards-compatible fashion, and are not expected
to be in wide use.

Each warning should contain a link for more information on what the warning
means and how to resolve it.


To solve this problem, you can try the following approaches:


- If the issue is not solved by updating the dependencies, a fix has to be
implemented by those dependencies. You can help with that by notifying the
maintainers of this problem (e.g. by creating a bug report) or by proposing a
fix to the maintainers (e.g. by creating a pull request):

  - lalrpop@0.19.8
  - Repository: https://github.com/lalrpop/lalrpop
  - Detailed warning command: `cargo report future-incompatibilities --id 10 --package lalrpop@0.19.8`

- If waiting for an upstream fix is not an option, you can use the `[patch]`
section in `Cargo.toml` to use your own version of the dependency. For more
information, see:
https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch-section
        
The package `lalrpop v0.19.8` currently triggers the following future incompatibility lints:
> warning: trailing semicolon in macro used in expression position
>    --> C:\Users\USERNAME\.cargo\registry\src\github.com-1ecc6299db9ec823\lalrpop-0.19.8\src\normalize\mod.rs:22:11
>     |
> 22  |           });
>     |             ^
>     |
>    ::: C:\Users\USERNAME\.cargo\registry\src\github.com-1ecc6299db9ec823\lalrpop-0.19.8\src\normalize\prevalidate\mod.rs:158:42
>     |
> 158 |   ...                   _ => return_err!(
>     |  ____________________________-
> 159 | | ...                       annotation.id_span,
> 160 | | ...                       r#"`cfg` annotations must have a `feature = "my_feature" argument"#
> 161 | | ...                   ),
>     | |_______________________- 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: `#[allow(semicolon_in_expressions_from_macros)]` on by default
>     = note: this warning originates in the macro `return_err` (in Nightly builds, run with -Z macro-backtrace for more info)
> 
> warning: trailing semicolon in macro used in expression position
>    --> C:\Users\USERNAME\.cargo\registry\src\github.com-1ecc6299db9ec823\lalrpop-0.19.8\src\normalize\mod.rs:22:11
>     |
> 22  |         });
>     |           ^
>     |
>    ::: C:\Users\USERNAME\.cargo\registry\src\github.com-1ecc6299db9ec823\lalrpop-0.19.8\src\normalize\prevalidate\mod.rs:241:40
>     |
> 241 | ...) => return_err!(ann_prec.id_span, "invalid argument `{}` for precedence annotation, expected `{}`", name, precedence::LVL_ARG),
>     |         -------------------------------------------------------------------------------------------------------------------------- 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: `#[allow(semicolon_in_expressions_from_macros)]` on by default
>     = note: this warning originates in the macro `return_err` (in Nightly builds, run with -Z macro-backtrace for more info)
> 
> warning: trailing semicolon in macro used in expression position
>    --> C:\Users\USERNAME\.cargo\registry\src\github.com-1ecc6299db9ec823\lalrpop-0.19.8\src\normalize\mod.rs:22:11
>     |
> 22  |         });
>     |           ^
>     |
>    ::: C:\Users\USERNAME\.cargo\registry\src\github.com-1ecc6299db9ec823\lalrpop-0.19.8\src\normalize\prevalidate\mod.rs:242:29
>     |
> 242 |                     None => return_err!(ann_prec.id_span, "missing argument for precedence annotation, expected `{}`", precedence::LVL_ARG),
>     |                             --------------------------------------------------------------------------------------------------------------- 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: `#[allow(semicolon_in_expressions_from_macros)]` on by default
>     = note: this warning originates in the macro `return_err` (in Nightly builds, run with -Z macro-backtrace for more info)
> 
> warning: trailing semicolon in macro used in expression position
>    --> C:\Users\USERNAME\.cargo\registry\src\github.com-1ecc6299db9ec823\lalrpop-0.19.8\src\normalize\mod.rs:22:11
>     |
> 22  |         });
>     |           ^
>     |
>    ::: C:\Users\USERNAME\.cargo\registry\src\github.com-1ecc6299db9ec823\lalrpop-0.19.8\src\normalize\prevalidate\mod.rs:253:40
>     |
> 253 | ...=> return_err!(ann_assoc.id_span, "invalid argument `{}` for associativity annotation, expected `{}`", name, precedence::SIDE_ARG),
>     |       ------------------------------------------------------------------------------------------------------------------------------- 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: `#[allow(semicolon_in_expressions_from_macros)]` on by default
>     = note: this warning originates in the macro `return_err` (in Nightly builds, run with -Z macro-backtrace for more info)
> 
> warning: trailing semicolon in macro used in expression position
>    --> C:\Users\USERNAME\.cargo\registry\src\github.com-1ecc6299db9ec823\lalrpop-0.19.8\src\normalize\mod.rs:22:11
>     |
> 22  |         });
>     |           ^
>     |
>    ::: C:\Users\USERNAME\.cargo\registry\src\github.com-1ecc6299db9ec823\lalrpop-0.19.8\src\normalize\prevalidate\mod.rs:254:29
>     |
> 254 | ...one => return_err!(ann_assoc.id_span, "missing argument for associativity annotation, expected `{}`", precedence::SIDE_ARG),
>     |           -------------------------------------------------------------------------------------------------------------------- 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: `#[allow(semicolon_in_expressions_from_macros)]` on by default
>     = note: this warning originates in the macro `return_err` (in Nightly builds, run with -Z macro-backtrace for more info)
> 
> warning: trailing semicolon in macro used in expression position
>    --> C:\Users\USERNAME\.cargo\registry\src\github.com-1ecc6299db9ec823\lalrpop-0.19.8\src\normalize\mod.rs:22:11
>     |
> 22  |           });
>     |             ^
>     |
>    ::: C:\Users\USERNAME\.cargo\registry\src\github.com-1ecc6299db9ec823\lalrpop-0.19.8\src\normalize\resolve\mod.rs:228:76
>     |
> 228 |                       Def::Nonterminal(0) | Def::Terminal | Def::MacroArg => return_err!(
>     |  ____________________________________________________________________________-
> 229 | |                         symbol.span,
> 230 | |                         "`{}` is a {}, not a macro",
> 231 | |                         msym.name,
> 232 | |                         def.description()
> 233 | |                     ),
>     | |_____________________- 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: `#[allow(semicolon_in_expressions_from_macros)]` on by default
>     = note: this warning originates in the macro `return_err` (in Nightly builds, run with -Z macro-backtrace for more info)
> 
> warning: trailing semicolon in macro used in expression position
>    --> C:\Users\USERNAME\.cargo\registry\src\github.com-1ecc6299db9ec823\lalrpop-0.19.8\src\normalize\mod.rs:22:11
>     |
> 22  |         });
>     |           ^
>     |
>    ::: C:\Users\USERNAME\.cargo\registry\src\github.com-1ecc6299db9ec823\lalrpop-0.19.8\src\normalize\resolve\mod.rs:273:36
>     |
> 273 |             Def::Nonterminal(_) => return_err!(symbol.span, "`{}` is a macro", id),
>     |                                    ----------------------------------------------- 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: `#[allow(semicolon_in_expressions_from_macros)]` on by default
>     = note: this warning originates in the macro `return_err` (in Nightly builds, run with -Z macro-backtrace for more info)
> 
> warning: trailing semicolon in macro used in expression position
>    --> C:\Users\USERNAME\.cargo\registry\src\github.com-1ecc6299db9ec823\lalrpop-0.19.8\src\normalize\mod.rs:22:11
>     |
> 22  |         });
>     |           ^
>     |
>    ::: C:\Users\USERNAME\.cargo\registry\src\github.com-1ecc6299db9ec823\lalrpop-0.19.8\src\normalize\resolve\mod.rs:281:21
>     |
> 281 |             None => return_err!(span, "no definition found for `{}`", id),
>     |                     ----------------------------------------------------- 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: `#[allow(semicolon_in_expressions_from_macros)]` on by default
>     = note: this warning originates in the macro `return_err` (in Nightly builds, run with -Z macro-backtrace for more info)
> 
> warning: trailing semicolon in macro used in expression position
>    --> C:\Users\USERNAME\.cargo\registry\src\github.com-1ecc6299db9ec823\lalrpop-0.19.8\src\normalize\mod.rs:22:11
>     |
> 22  |         });
>     |           ^
>     |
>    ::: C:\Users\USERNAME\.cargo\registry\src\github.com-1ecc6299db9ec823\lalrpop-0.19.8\src\normalize\macro_expand\mod.rs:167:21
>     |
> 167 |             None => return_err!(span, "no macro definition found for `{}`", msym.name),
>     |                     ------------------------------------------------------------------ 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: `#[allow(semicolon_in_expressions_from_macros)]` on by default
>     = note: this warning originates in the macro `return_err` (in Nightly builds, run with -Z macro-backtrace for more info)
> 
> warning: trailing semicolon in macro used in expression position
>    --> C:\Users\USERNAME\.cargo\registry\src\github.com-1ecc6299db9ec823\lalrpop-0.19.8\src\normalize\mod.rs:22:11
>     |
> 22  |         });
>     |           ^
>     |
>    ::: C:\Users\USERNAME\.cargo\registry\src\github.com-1ecc6299db9ec823\lalrpop-0.19.8\src\normalize\macro_expand\mod.rs:320:25
>     |
> 320 |             Err(err) => return_err!(span, "invalid regular expression `{}`: {}", regex, err),
>     |                         -------------------------------------------------------------------- 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: `#[allow(semicolon_in_expressions_from_macros)]` on by default
>     = note: this warning originates in the macro `return_err` (in Nightly builds, run with -Z macro-backtrace for more info)
> 
> warning: trailing semicolon in macro used in expression position
>    --> C:\Users\USERNAME\.cargo\registry\src\github.com-1ecc6299db9ec823\lalrpop-0.19.8\src\normalize\mod.rs:22:11
>     |
> 22  |           });
>     |             ^
>     |
>    ::: C:\Users\USERNAME\.cargo\registry\src\github.com-1ecc6299db9ec823\lalrpop-0.19.8\src\normalize\macro_expand\mod.rs:398:21
>     |
> 398 | /                     return_err!(
> 399 | |                     span,
> 400 | |                     "named symbols like `{}:{}` are only allowed at the top-level of a nonterminal",
> 401 | |                     ex_id, ex_sym)
>     | |__________________________________- 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 `return_err`
>     = note: `#[allow(semicolon_in_expressions_from_macros)]` on by default
>     = note: this warning originates in the macro `return_err` (in Nightly builds, run with -Z macro-backtrace for more info)
> 
> warning: trailing semicolon in macro used in expression position
>    --> C:\Users\USERNAME\.cargo\registry\src\github.com-1ecc6299db9ec823\lalrpop-0.19.8\src\normalize\mod.rs:22:11
>     |
> 22  |           });
>     |             ^
>     |
>    ::: C:\Users\USERNAME\.cargo\registry\src\github.com-1ecc6299db9ec823\lalrpop-0.19.8\src\normalize\token_check\mod.rs:366:13
>     |
> 366 | /             return_err!(
> 367 | |                 spans[literal],
> 368 | |                 "{} are not supported in regular expressions",
> 369 | |                 feature
> 370 | |             )
>     | |_____________- 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 `return_err`
>     = note: `#[allow(semicolon_in_expressions_from_macros)]` on by default
>     = note: this warning originates in the macro `return_err` (in Nightly builds, run with -Z macro-backtrace for more info)
> 
> warning: trailing semicolon in macro used in expression position
>    --> C:\Users\USERNAME\.cargo\registry\src\github.com-1ecc6299db9ec823\lalrpop-0.19.8\src\normalize\mod.rs:22:11
>     |
> 22  |           });
>     |             ^
>     |
>    ::: C:\Users\USERNAME\.cargo\registry\src\github.com-1ecc6299db9ec823\lalrpop-0.19.8\src\normalize\token_check\mod.rs:376:13
>     |
> 376 | /             return_err!(
> 377 | |                 spans[literal0],
> 378 | |                 "ambiguity detected between the terminal `{}` and the terminal `{}`",
> 379 | |                 literal0,
> 380 | |                 literal1
> 381 | |             )
>     | |_____________- 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 `return_err`
>     = note: `#[allow(semicolon_in_expressions_from_macros)]` on by default
>     = note: this warning originates in the macro `return_err` (in Nightly builds, run with -Z macro-backtrace for more info)
> 
@ithinuel
Copy link
Contributor

ithinuel commented Feb 1, 2023

@kleinesfilmroellchen
Copy link
Author

Yes, that looks good!

@fanninpm
Copy link

@matklad do you want to look at the numerous PRs that want to fix this?

@youknowone
Copy link
Contributor

A new version is released. Thank you for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants