pub enum TyContext {
LocalDecl {
local: Local,
source_info: SourceInfo,
},
UserTy(Span),
ReturnTy(SourceInfo),
YieldTy(SourceInfo),
Location(Location),
}
Expand description
Extra information passed to visit_ty
and friends to give context
about where the type etc appears.
Variants§
LocalDecl
Fields
§
source_info: SourceInfo
The source location where this local variable was declared.
UserTy(Span)
The inferred type of a user type annotation.
ReturnTy(SourceInfo)
The return type of the function.
YieldTy(SourceInfo)
Location(Location)
A type found at some location.
Auto Trait Implementations§
impl RefUnwindSafe for TyContext
impl !Send for TyContext
impl !Sync for TyContext
impl Unpin for TyContext
impl UnwindSafe for TyContext
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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.