Enum rustdoc::passes::collect_intra_doc_links::ResolutionFailure [−][src]
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
This resolved, but with the wrong namespace.
Fields of WrongNamespace
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.
The link failed to resolve. resolution_failure should look to see if there’s
a more helpful error that can be given.
Fields of NotResolved
module_id: DefIdThe scope the link was resolved in.
partial_res: Option<Res>If part of the link resolved, this has the Res.
In [std::io::Error::x], std::io::Error would be a partial resolution.
unresolved: Cow<'a, str>The remaining unresolved path segments.
In [std::io::Error::x], x would be unresolved.
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.
Tuple Fields of MalformedGenerics
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
Trait Implementations
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
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
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