You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the cargo install hyperbuild command, hyperbuild fails to compile if the user is using a recent version of rustc.
Output (rustc 1.41.0):
Updating crates.io index
Installing hyperbuild v0.0.45
...
Compiling hyperbuild v0.0.45
error[E0716]: temporary value dropped while borrowed
--> /home/katattakd/.cargo/registry/src/github.com-1ecc6299db9ec823/hyperbuild-0.0.45/src/spec/tag/omission.rs:149:86
|
149 | pub static CLOSING_TAG_OMISSION_RULES: Map<&'static [u8], &ClosingTagOmissionRule> = phf_map! {
| ______________________________________________________________________________________^
150 | | b"li" => LI_CLOSING_TAG_OMISSION_RULE,
151 | | b"dt" => DT_CLOSING_TAG_OMISSION_RULE,
152 | | b"dd" => DD_CLOSING_TAG_OMISSION_RULE,
... |
163 | | b"th" => TH_CLOSING_TAG_OMISSION_RULE,
164 | | };
| | ^
| | |
| | creates a temporary which is freed while still in use
| |_temporary value is freed at the end of this statement
| cast requires that borrow lasts for `'static`
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error[E0716]: temporary value dropped while borrowed
--> /home/katattakd/.cargo/registry/src/github.com-1ecc6299db9ec823/hyperbuild-0.0.45/src/spec/tag/whitespace.rs:51:91
|
51 | static TAG_WHITESPACE_MINIFICATION: Map<&'static [u8], &'static WhitespaceMinification> = phf_map! {
| ___________________________________________________________________________________________^
52 | | // Content tags.
53 | | b"address" => CONTENT,
54 | | b"audio" => CONTENT,
... |
159 | | b"pre" => WHITESPACE_SENSITIVE,
160 | | };
| | ^
| | |
| | creates a temporary which is freed while still in use
| |_temporary value is freed at the end of this statement
| cast requires that borrow lasts for `'static`
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error[E0716]: temporary value dropped while borrowed
--> /tmp/hyperbuild/debug/build/hyperbuild-eec30dbf52dbad28/out/gen_attrs.rs:7093:42
|
7093 | pub static ATTRS: AttrMap = AttrMap::new(phf::phf_map! {
| __________________________________________^
7094 | | b"textrendering" => TEXTRENDERING_ATTR,
7095 | | b"dx" => DX_ATTR,
7096 | | b"restart" => RESTART_ATTR,
... |
7493 | | b"tablevalues" => TABLEVALUES_ATTR,
7494 | | });
| | ^- temporary value is freed at the end of this statement
| | |
| |_creates a temporary which is freed while still in use
| cast requires that borrow lasts for `'static`
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for moreinfo)
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0716`.
error: failed to compile `hyperbuild v0.0.45`, intermediate artifacts can be found at `/tmp/hyperbuild`
Caused by:
could not compile `hyperbuild`.
To learn more, run the command again with --verbose.
The above error is the same in newer versions of rust.
This seems to be rust-phf/rust-phf#187 which itself is caused by rust-lang/rust#70584. Not sure if we can work around the regression, will take a deeper look later.
I've switched all usages of phf over to lazy_static with the built in std::collections::Hash{Set,Map} data structures; everything seems to be working OK. It's now building on Rust 1.44.1.
The Python module was also not compiling due to PyO3 needing a newer Rust version, so now it's also working again.
Would like to revisit phf in the future if the bug gets fixed but I think the one-off initialisation costs are probably intangible.
When running the
cargo install hyperbuild
command, hyperbuild fails to compile if the user is using a recent version of rustc.Output (rustc 1.41.0):
The above error is the same in newer versions of rust.
Ouput (rustc 1.40.0):
The text was updated successfully, but these errors were encountered: