rust-bakery / nom

Rust parser combinator framework
MIT License
9.38k stars 806 forks source link

Fix for trailing semicolon in macros. #1657

Closed jasonish closed 1 year ago

jasonish commented 1 year ago

Remove trailing semicolons in expression macro bodies as they will soon not be allowed by the compiler.

See https://github.com/rust-lang/rust/issues/79813 for more information.

We support older releases of Suricata (https://github.com/OISF/suricata) longer than many Rust projects seem to be supported and will be depending on Nom 5.x for some time into the future and would like to prevent a new version of the compiler from breaking builds for our users.

Our hope is that Nom will consider a 5.1.3 release with these changes so we don't have to maintain a fork until our oldest supported release goes end of life.

Geal commented 1 year ago

I won't have the time to work on older versions, but if you provide the fixes like this one, I can make releases. Do you ave other ones to propose while we're there?

jasonish commented 1 year ago

This is it from what I can tell. This makes the nom 5.0 branch --future-incompat-report clean with rustc 1.68.2 and 1.71.0-nightly (d0f204e4d 2023-04-16) which is our primary concern here.

Geal commented 1 year ago

nom 5.1.3 and 6.2.2 are released with this fix, thank you for your help!