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
Describe the bug cargo install cargo-deny fails with the following error:
PS C:\Users\myuser\Desktop\test> cargo install cargo-deny
Updating crates.io index
Installing cargo-deny v0.7.3
Compiling autocfg v1.0.1
...
Compiling proc-macro2 v1.0.22
Compiling zstd-safe v2.0.5+zstd.1.4.5
Compiling zstd v0.5.3+zstd.1.4.5
Compiling smol_str v0.1.17
Compiling hex v0.4.2
Compiling semver v0.10.0
error[E0658]: `while` is not allowed in a `const fn`
--> C:\Users\myuser\.cargo\registry\src\github.com-1ecc6299db9ec823\smol_str-0.1.17\src\lib.rs:58:9
|
58 | / while i < text.len() {
59 | | buf[i] = text.as_bytes()[i];
60 | | i += 1
61 | | }
| |_________^
|
= note: see issue #52000 <https://github.com/rust-lang/rust/issues/52000> for more information
error: aborting due to previous error
For more information about this error, try `rustc --explain E0658`.
error: could not compile `smol_str`.
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `cargo-deny v0.7.3`, intermediate artifacts can be found at `C:\Users\myuser\AppData\Local\Temp\cargo-installS1XFRH`
Caused by:
build failed
To Reproduce
Simply run cargo install cargo-deny.
I reproduced this on Windows, but I don't think this is platform-specific.
Expected behavior cargo install cargo-deny should not fail
Device:
OS: Windows 10
Version: cargo-deny 0.7.3 (the issue is caused by smol_str 0.1.17)
Additional context
This other project has encountered the same issue recently and addressed it by pinning the version of smol_str: rustsec/rustsec#258.
The text was updated successfully, but these errors were encountered:
Thanks for the report, found this original issue on smol_str repo rust-analyzer/smol_str#25 and it defines minimum Rust version as "latest stable" Rust, which makes cargo-deny also require latest stable Rust.
That may be a bit too aggressive for a tool, though we generally also just use latest stable. But could consider pinning it to the previous version for now, or replacing it (depending on which of our dependencies are using it).
If you are able to, then updating to latest stable with rustup update, and then building/installing it should just work then.
I confirm that the problem is solved when updating to cargo 1.46.0. I previously was on cargo 1.45.2.
I also agree that, for a tool, requiring the very latest version of the language is very aggressive: some users may be unable to update their build infrastructure right away.
Thanks for quickly replying.
Feel free to close this if you decide not to address it.
Thanks for reporting this, I'll update rustsec so that we don't need absolute latest stable and add a MSRV notice on the Readme, as well as a ci check for the lowest version we can support so at least when it changes we are aware about it and can update the Readme.
Describe the bug
cargo install cargo-deny
fails with the following error:To Reproduce
Simply run
cargo install cargo-deny
.I reproduced this on Windows, but I don't think this is platform-specific.
Expected behavior
cargo install cargo-deny
should not failDevice:
cargo-deny
0.7.3 (the issue is caused bysmol_str
0.1.17)Additional context
This other project has encountered the same issue recently and addressed it by pinning the version of
smol_str
: rustsec/rustsec#258.The text was updated successfully, but these errors were encountered: