enum ResolutionFailure<'a> {
WrongNamespace {
res: Res,
expected_ns: Namespace,
},
NotResolved {
module_id: DefId,
partial_res: Option<Res>,
unresolved: Cow<'a, str>,
},
NoParentItem,
MalformedGenerics(MalformedGenerics),
Dummy,
}Expand description
A link failed to resolve.
Variants
WrongNamespace
Fields
res: ResWhat the link resolved to.
expected_ns: NamespaceThe expected namespace for the resolution, determined from the link’s disambiguator.
E.g., for [fn@Result] this is Namespace::ValueNS,
even though Result’s actual namespace is Namespace::TypeNS.
This resolved, but with the wrong namespace.
NotResolved
Fields
module_id: DefIdThe scope the link was resolved in.
The link failed to resolve. resolution_failure should look to see if there’s
a more helpful error that can be given.
NoParentItem
This happens when rustdoc can’t determine the parent scope for an item. It is always a bug in rustdoc.
MalformedGenerics(MalformedGenerics)
This link has malformed generic parameters; e.g., the angle brackets are unbalanced.
Dummy
Used to communicate that this should be ignored, but shouldn’t be reported to the user.
This happens when there is no disambiguator and one of the namespaces failed to resolve.
Implementations
sourceimpl ResolutionFailure<'_>
impl ResolutionFailure<'_>
Trait Implementations
sourceimpl<'a> Debug for ResolutionFailure<'a>
impl<'a> Debug for ResolutionFailure<'a>
sourceimpl<'a> From<ResolutionFailure<'a>> for ErrorKind<'a>
impl<'a> From<ResolutionFailure<'a>> for ErrorKind<'a>
sourcefn from(err: ResolutionFailure<'a>) -> Self
fn from(err: ResolutionFailure<'a>) -> Self
Performs the conversion.
Auto Trait Implementations
impl<'a> RefUnwindSafe for ResolutionFailure<'a>
impl<'a> Send for ResolutionFailure<'a>
impl<'a> Sync for ResolutionFailure<'a>
impl<'a> Unpin for ResolutionFailure<'a>
impl<'a> UnwindSafe for ResolutionFailure<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
impl<'a, T> Captures<'a> for T where
T: ?Sized,
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 56 bytes
Size for each variant:
WrongNamespace: 15 bytesNotResolved: 55 bytesNoParentItem: 0 bytesMalformedGenerics: 1 byteDummy: 0 bytes