Skip to content
Myr

Use doc_cfg to mark Error::new

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 e46df9f · Browse files · 3 files+3 added−0 removed
This commit

State

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

Diff stats

3 files+3 added−0 removed

  • other:+3 added−0 removed

3 files+3 added−0 removed

modified:src/error.rs+1 added
17 unmodified lines
18 ///19 /// If the error type does not provide a backtrace, a backtrace will be20 /// created here to ensure that a backtrace exists.21 #[cfg(feature = "std")]22 #[cfg_attr(doc_cfg, doc(cfg(feature = "std")))]23 pub fn new<E>(error: E) -> Self24 where25 E: StdError + Send + Sync + 'static,26 {
776 unmodified lines
modified:src/lib.rs+1 added
189 unmodified lines
190//! non-Anyhow error type inside a function that returns Anyhow's error type.191192#![doc(html_root_url = "https://docs.rs/anyhow/1.0.27")]193#![cfg_attr(backtrace, feature(backtrace))]194#![cfg_attr(doc_cfg, feature(doc_cfg))]195#![cfg_attr(not(feature = "std"), no_std)]196#![allow(197 clippy::needless_doctest_main,198 clippy::new_ret_no_self,
397 unmodified lines
modified:Cargo.toml+1 added