diff --git a/riscv-types/CHANGELOG.md b/riscv-types/CHANGELOG.md index bdaa295e..245c286c 100644 --- a/riscv-types/CHANGELOG.md +++ b/riscv-types/CHANGELOG.md @@ -9,9 +9,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Changed +- Bump MSRV to 1.81 due to `core::error::Error` trait +- Mark `result::Error` as `#[non_exhaustive]` to allow non-breaking new variants - Update license to `MIT or Apache-2.0` - Renamed crate to `riscv-types` as per [#351](https://github.com/rust-embedded/riscv/issues/351) +### Added + +- Implement `core::error::Error` for `result::Error` + ## riscv-pac [v0.2.0] - 2024-10-19 ### Added diff --git a/riscv-types/Cargo.toml b/riscv-types/Cargo.toml index 29293eda..b06c017f 100644 --- a/riscv-types/Cargo.toml +++ b/riscv-types/Cargo.toml @@ -2,7 +2,7 @@ name = "riscv-types" version = "0.1.0" edition = "2021" -rust-version = "1.60" +rust-version = "1.81" repository = "https://github.com/rust-embedded/riscv" authors = ["The RISC-V Team "] categories = ["embedded", "hardware-support", "no-std"] diff --git a/riscv-types/README.md b/riscv-types/README.md index 6745b98d..89f088d3 100644 --- a/riscv-types/README.md +++ b/riscv-types/README.md @@ -11,7 +11,7 @@ This project is developed and maintained by the [RISC-V team][team]. ## Minimum Supported Rust Version (MSRV) -This crate is guaranteed to compile on stable Rust 1.60 and up. It *might* +This crate is guaranteed to compile on stable Rust 1.81 and up. It *might* compile with older versions but that may change in any new patch release. ## License diff --git a/riscv-types/src/result.rs b/riscv-types/src/result.rs index b55c8beb..fa158529 100644 --- a/riscv-types/src/result.rs +++ b/riscv-types/src/result.rs @@ -5,6 +5,7 @@ pub type Result = core::result::Result; /// Represents error variants for the library. #[derive(Clone, Copy, Debug, Eq, PartialEq)] +#[non_exhaustive] pub enum Error { /// Attempted out-of-bounds access. IndexOutOfBounds { @@ -56,3 +57,5 @@ impl fmt::Display for Error { } } } + +impl core::error::Error for Error {}