pub enum Resolved<T> {
Exact(T),
Ambiguous(Vec<T>),
Unresolved(String),
}Expand description
The outcome of any lookup the analyzer performs.
Generic on purpose: every resolution step (field type, callee, prefix) returns one of these, so “we did not know” is representable everywhere and cannot decay into a default.
Variants§
Exact(T)
Exactly one answer, statically certain.
Ambiguous(Vec<T>)
Several possible answers and no way to choose. Never silently pick the first.
Unresolved(String)
Nothing could be determined. Carries why, for the diagnostic stream.
Implementations§
Trait Implementations§
impl<T: Eq> Eq for Resolved<T>
impl<T: PartialEq> StructuralPartialEq for Resolved<T>
Auto Trait Implementations§
impl<T> Freeze for Resolved<T>where
T: Freeze,
impl<T> RefUnwindSafe for Resolved<T>where
T: RefUnwindSafe,
impl<T> Send for Resolved<T>where
T: Send,
impl<T> Sync for Resolved<T>where
T: Sync,
impl<T> Unpin for Resolved<T>where
T: Unpin,
impl<T> UnsafeUnpin for Resolved<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Resolved<T>where
T: UnwindSafe,
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