Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 2 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#![allow(clippy::all)]
#![no_std]

#[cfg(feature = "std")]
#[cfg(feature = "fuzzing")]
extern crate std;

extern crate alloc;
Expand Down Expand Up @@ -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<F: Function>(
Expand Down