pub struct TypedAssignMismatch {
pub range: TextRange,
pub target: String,
pub expected: Ty,
pub found: Ty,
}Expand description
One statically-checkable type mismatch at a declaration-initializer or
assignment site against an already-known declared type (issue #1877) —
the ~ temp/plain-assignment sibling of DirectCallArgMismatch, which
covers only direct-call arguments.
Fields§
§range: TextRangeThe diagnostic site: the temp’s own name range for a ~ temp
initializer (matching strict::collect_temps’s escape-check anchor),
or the assignment target Path’s own range for a plain assignment
(matching DirectCallArgMismatch::range’s callee-range
convention).
target: StringThe declared local/global’s bare name.
expected: TyThe target’s already-known declared type.
found: TyThe initializer/RHS expression’s statically classified type.
Trait Implementations§
Source§impl Clone for TypedAssignMismatch
impl Clone for TypedAssignMismatch
Source§fn clone(&self) -> TypedAssignMismatch
fn clone(&self) -> TypedAssignMismatch
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TypedAssignMismatch
impl Debug for TypedAssignMismatch
impl Eq for TypedAssignMismatch
Source§impl PartialEq for TypedAssignMismatch
impl PartialEq for TypedAssignMismatch
impl StructuralPartialEq for TypedAssignMismatch
Auto Trait Implementations§
impl Freeze for TypedAssignMismatch
impl RefUnwindSafe for TypedAssignMismatch
impl Send for TypedAssignMismatch
impl Sync for TypedAssignMismatch
impl Unpin for TypedAssignMismatch
impl UnsafeUnpin for TypedAssignMismatch
impl UnwindSafe for TypedAssignMismatch
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.