-
Notifications
You must be signed in to change notification settings - Fork 222
Open
Description
Support for error_in_core in no_std context was added in #1241 But it seems the use_feature_or_nothing("error_in_core");
check in build.rs
requires nightly even with rust 1.81+.
❯ rustc --version
rustc 1.85.0 (4d91de4e4 2025-02-17)
Cargo.toml
[package]
name = "error"
version = "0.1.0"
edition = "2024"
[dependencies]
rustix = { version = "1.1.2", default-features = false }
main.rs
#![no_std]
use rustix::io::Errno;
use core::error::Error;
fn use_err<E: Error>(err: E) {}
fn main() {
use_err(Errno::ACCESS);
}
cargo build
error[E0277]: the trait bound `Errno: core::error::Error` is not satisfied
--> src/main.rs:10:13
|
10 | use_err(Errno::ACCESS);
| ------- ^^^^^^^^^^^^^ the trait `core::error::Error` is not implemented for `Errno`
| |
| required by a bound introduced by this call
|
note: required by a bound in `use_err`
--> src/main.rs:7:15
|
7 | fn use_err<E: Error>(err: E) {}
| ^^^^^ required by this bound in `use_err`
Metadata
Metadata
Assignees
Labels
No labels