Skip to content

cargo audit does not work on Rust 1.44 anymore #254

@galich

Description

@galich

While running cargo install cargo-audit --force with Rust 1.44 we are getting following error in smol_str:

error[E0658]: `while` is not allowed in a `const fn`
  --> C:\Users\serg\.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

cargo-audit uses crates-index which uses smol_str and now "cargo audit requires Rust 1.40 or later." claim does not hold.

our CI runs cargo audit and must keep running on Rust 1.44 due to performance issues with 1.45-1.46.

would it be possible to pin smol_str in Cargo.lock to something that works with older compiler versions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions