diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 13498626..b9f8c519 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -56,11 +56,7 @@ jobs: - uses: actions/checkout@v3 with: submodules: true - - run: | - set -e - curl -L https://github.com/EmbarkStudios/cargo-deny/releases/download/0.14.22/cargo-deny-0.14.22-x86_64-unknown-linux-musl.tar.gz | tar xzf - - mv cargo-deny-*-x86_64-unknown-linux-musl/cargo-deny cargo-deny - echo `pwd` >> $GITHUB_PATH + - run: cargo install cargo-deny - run: cargo deny check # Builds the fuzz targets. diff --git a/Cargo.toml b/Cargo.toml index 010f8c03..5ed9c89d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,7 +40,8 @@ overflow-checks = true [features] default = ["std"] -# Enables std-specific features such as the Error trait for RegAllocError. +# Currently does nothing, but historically enabled some `std` features such as +# the `Error` trait. std = [] # Enables generation of DefAlloc edits for the checker. diff --git a/src/lib.rs b/src/lib.rs index 1f2d3276..30a4bcc8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -14,7 +14,7 @@ #![allow(clippy::all)] #![no_std] -#[cfg(feature = "std")] +#[cfg(feature = "fuzzing")] extern crate std; extern crate alloc; @@ -1627,8 +1627,7 @@ impl core::fmt::Display for RegAllocError { } } -#[cfg(feature = "std")] -impl std::error::Error for RegAllocError {} +impl core::error::Error for RegAllocError {} /// Run the allocator. pub fn run(