pub enum ExternSpecMappingErr {
    IsLocal(LocalDefId),
    Dup(LocalDefId),
}Expand description
Represents errors that can occur when inserting a mapping between a LocalDefId and a DefId
for an extern spec.
Variants§
IsLocal(LocalDefId)
Indicates that the DefId we are trying to add extern specs to is actually local. Returns
the DefId as a LocalDefId.
Dup(LocalDefId)
Indicates that there is an existing extern spec for the given extern id. Returns the existing
LocalDefId that maps to the extern id.
NOTE: This currently only considers extern specs defined in the local crate. There could still be duplicates if an extern spec is imported from an external crate. In such cases, the local extern spec takes precedence. Probably, we should at least warn about this, but it’s a bit tricky because we need to look at the crate metadata which we don’t have handy when collecting specs.
Auto Trait Implementations§
impl Freeze for ExternSpecMappingErr
impl RefUnwindSafe for ExternSpecMappingErr
impl Send for ExternSpecMappingErr
impl Sync for ExternSpecMappingErr
impl Unpin for ExternSpecMappingErr
impl UnwindSafe for ExternSpecMappingErr
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
 
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more