pub enum ImportOrigin {
Written,
Default,
}Expand description
Part of Error::AmbiguousVariables and Error::AmbiguousVariants’s public
shape, so it is re-exported alongside the error rather than left behind a
private module.
Whether a contributor to a module’s scope was named by an import line the
file wrote, or supplied by the default import
list because the file wrote none for that
module.
Carried alongside ValueType::Foreign/Foreigns purely for diagnostics:
super::Error::AmbiguousVariables’s note calls a Default contributor out
as implicit, since the collision it causes sits in a module the file never
named — The default
imports states the rule
that a default entry participates in ambiguity exactly as a written import
does; this is what lets the diagnostic say which kind of import it was.
Variants§
Written
Named by an import line in the module under check.
Default
Not written by the module under check — supplied because the module wrote no import for it.
Trait Implementations§
Source§impl Clone for ImportOrigin
impl Clone for ImportOrigin
Source§fn clone(&self) -> ImportOrigin
fn clone(&self) -> ImportOrigin
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ImportOrigin
Source§impl Debug for ImportOrigin
impl Debug for ImportOrigin
impl Eq for ImportOrigin
Source§impl PartialEq for ImportOrigin
impl PartialEq for ImportOrigin
impl StructuralPartialEq for ImportOrigin
Auto Trait Implementations§
impl Freeze for ImportOrigin
impl RefUnwindSafe for ImportOrigin
impl Send for ImportOrigin
impl Sync for ImportOrigin
impl Unpin for ImportOrigin
impl UnsafeUnpin for ImportOrigin
impl UnwindSafe for ImportOrigin
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.