Skip to content
Myr

Work around ridiculous rust-analyzer behavior

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

As far as I can tell there is still no way to keep it from autoimporting the private macros and enum variants here: anyhow::__private::format, anyhow::__private::Err.

authored by David Tolnay · committed by David Tolnay · parent cbade7d · Browse files · 2 files+9 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+9 added−0 removed

  • other:+9 added−0 removed

2 files+9 added−0 removed

modified:src/kind.rs+3 added
50 unmodified lines
51use crate::StdError;5253pub struct Adhoc;5455#[doc(hidden)]56pub trait AdhocKind: Sized {57 #[inline]58 fn anyhow_kind(&self) -> Adhoc {59 Adhoc
13 unmodified lines
73}7475pub struct Trait;7677#[doc(hidden)]78pub trait TraitKind: Sized {79 #[inline]80 fn anyhow_kind(&self) -> Trait {81 Trait
15 unmodified lines
97#[cfg(feature = "std")]98pub struct Boxed;99100#[cfg(feature = "std")]101#[doc(hidden)]102pub trait BoxedKind: Sized {103 #[inline]104 fn anyhow_kind(&self) -> Boxed {105 Boxed
14 unmodified lines
modified:src/lib.rs+6 added
640 unmodified lines
641 use crate::Error;642 use alloc::fmt;643 use core::fmt::Arguments;644645 #[doc(hidden)]646 pub use crate::ensure::{BothDebug, NotBothDebug};647 #[doc(hidden)]648 pub use alloc::format;649 #[doc(hidden)]650 pub use core::result::Result::Err;651 #[doc(hidden)]652 pub use core::{concat, format_args, stringify};653654 #[doc(hidden)]655 pub mod kind {656 #[doc(hidden)]657 pub use crate::kind::{AdhocKind, TraitKind};658659 #[cfg(feature = "std")]660 #[doc(hidden)]661 pub use crate::kind::BoxedKind;662 }663664 #[doc(hidden)]
25 unmodified lines