-
Bug
-
Resolution: Done-Errata
-
Undefined
-
rhel-8.8.0
-
librsvg2-2.42.7-5.el8
-
None
-
None
-
rhel-sst-display-desktop-foundation
-
18
-
20
-
None
-
False
-
-
None
-
None
-
Pass
-
None
-
If docs needed, set a value
-
-
Unspecified
-
None
Description of problem:
librsvg2 hits several "error: proc-macro derive panicked" when building with Rust 1.66.
Version-Release number of selected component (if applicable):
librsvg2-2.42.7-4.el8
How reproducible:
100%
Steps to Reproduce:
1. Upgrade to Rust 1.66 (bug 2123899)
2. Rebuild the librsvg2 rpm.
Actual results:
Several errors such as this:
error: proc-macro derive panicked
--> /builddir/build/BUILD/librsvg-2.42.7/vendor/cssparser/src/macros.rs:39:17
39 | cssparser_internal_assert_ascii_lowercase_max_len!( $( $match_body )* )
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
::: /builddir/build/BUILD/librsvg-2.42.7/vendor/cssparser/src/color.rs:213:31
213 | let degrees = match_ignore_ascii_case!
{ &*unit, | _______________________________- 214 | | "deg" => v, 215 | | "grad" => v * 360. / 400., 216 | | "rad" => v * 360. / (2. * PI), 217 | | "turn" => v * 360., 218 | | _ => return Err(location.new_unexpected_token_error(Token::Ident(unit.clone()))), 219 | | };
_________________- in this macro invocation | |
= help: message: expected suffix ").0," not found in "#[allow(unused)] enum ProceduralMasqueradeDummyType\n
{\n Input =\n (0, stringify!\n (\"deg\" => v, \"grad\" => v * 360. / 400., \"rad\" => v * 360. / (2. * PI),\n \"turn\" => v * 360., _ => return\n Err(location.new_unexpected_token_error(Token ::\n Ident(unit.clone()))),)).0\n}"
= note: this error originates in the macro `match_ignore_ascii_case` (in Nightly builds, run with -Z macro-backtrace for more info)
Expected results:
A successful rebuild.
Additional info:
The errors are in the vendored cssparser crate, but they actually stem from its dependency on procedural-masquerade 0.1.5, which made improper assumptions about macro tokenization, fixed in 0.1.7. The compiler has been maintaining a crude hack to avoid breaking this, until folks could upgrade their dependencies, and I have attached the future-incompatibilities report from Rust 1.62 for reference. Upstream has reduced the scope of that compiler hack as of Rust 1.66.