Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
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
Loading