Skip to content
Myr

Merge pull request #128 from dtolnay/doc-cfg

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

Fill in some more use of doc(cfg)

authored by David Tolnay · committed by GitHub · parents 99c9821, dc099d2 · Browse files · 2 files+6 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

2 files+6 added−0 removed

  • other:+6 added−0 removed

2 files+6 added−0 removed

modified:src/error.rs+5 added
327 unmodified lines
328 /// None329 /// }330 /// ```331 #[cfg(feature = "std")]332 #[cfg_attr(doc_cfg, doc(cfg(feature = "std")))]333 pub fn chain(&self) -> Chain {334 self.inner.chain()335 }336
2 unmodified lines
339 ///340 /// The root cause is the last error in the iterator produced by341 /// [`chain()`][Error::chain].342 #[cfg(feature = "std")]343 #[cfg_attr(doc_cfg, doc(cfg(feature = "std")))]344 pub fn root_cause(&self) -> &(dyn StdError + 'static) {345 self.chain().last().unwrap()346 }347
109 unmodified lines
457 }458}459460#[cfg(feature = "std")]461#[cfg_attr(doc_cfg, doc(cfg(feature = "std")))]462impl<E> From<E> for Error463where464 E: StdError + Send + Sync + 'static,465{
3 unmodified lines
469 }470}471472#[cfg(feature = "std")]473#[cfg_attr(doc_cfg, doc(cfg(feature = "std")))]474impl Deref for Error {475 type Target = dyn StdError + Send + Sync + 'static;476477 fn deref(&self) -> &Self::Target {
1 unmodified line
479 }480}481482#[cfg(feature = "std")]483#[cfg_attr(doc_cfg, doc(cfg(feature = "std")))]484impl DerefMut for Error {485 fn deref_mut(&mut self) -> &mut Self::Target {486 self.inner.error_mut()487 }
318 unmodified lines
modified:src/lib.rs+1 added
383 unmodified lines
384/// None385/// }386/// ```387#[cfg(feature = "std")]388#[cfg_attr(doc_cfg, doc(cfg(feature = "std")))]389#[derive(Clone)]390pub struct Chain<'a> {391 state: crate::chain::ChainState<'a>,392}
233 unmodified lines