Skip to content
Myr

Update documentation on no-std error type conversions

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Tolnay · committed by David Tolnay · parent afe93e7 · Browse files · 2 files+8 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+8 added−8 removed

  • other:+8 added−8 removed

2 files+8 added−8 removed

modified:src/lib.rs+4 added-4 removed
199 unmodified lines
200//! [dependencies]201//! anyhow = { version = "1.0", default-features = false }202//! ```203//!204//! Since the `?`-based error conversions would normally rely on the205//! `std::error::Error` trait which is only available through std, no_std mode206//! will require an explicit `.map_err(Error::msg)` when working with a207//! non-Anyhow error type inside a function that returns Anyhow's error type.204//! With versions of Rust older than 1.81, no_std mode may require an additional205//! `.map_err(Error::msg)` when working with a non-Anyhow error type inside a206//! function that returns Anyhow's error type, as the trait that `?`-based error207//! conversions are defined by is only available in std in those old versions.208209#![doc(html_root_url = "https://docs.rs/anyhow/1.0.87")]210#![cfg_attr(error_generic_member_access, feature(error_generic_member_access))]211#![no_std]
520 unmodified lines
modified:README.md+4 added-4 removed