pub struct UfcsCallArgs {
pub range: TextRange,
pub args: Vec<Ty>,
}Expand description
One UFCS-desugared call site’s (recv.name(args) → name(recv, args))
written-argument types (issue #1881) — the receiver itself is not
included here (its type is already known directly to
ufcs::UfcsVisitor, this fact’s sole consumer, from receiver-type
resolution). Recorded unconditionally at every multi-segment,
value-resolving call this pass walks (see
body::InferPass::infer_call’s own doc for why it cannot check anything
against a UFCS receiver directly) — this is the raw per-argument type
data brink_analyzer::ufcs’s own resolution pass needs to complete its
own argument-type check against the desugared free function’s
already-known declared param types (InferenceResult::signatures, keyed
by the target), without a second expression-type inference pass over
the same body.
Issue #1909 gave body::InferPass a narrow target lookup of its own
(infer_ufcs_free_fn_result, enough to type the call’s result), but
it deliberately declines the ambiguous, struct-receiver, projected-
receiver and prelude cases this fact’s consumer resolves properly — so
the split stays: the result type is inference’s, the argument-type
check remains ufcs’s, fed by this fact.
Fields§
§range: TextRangeThe callee Path’s own source range (recv.name’s whole span) —
same convention as DirectCallArgMismatch::range; ufcs::resolve
keys its own verdict table on this identical range (the
ResolvedRef::range contract, issue #1561).
args: Vec<Ty>Each written argument’s statically inferred type, in source order.
Trait Implementations§
Source§impl Clone for UfcsCallArgs
impl Clone for UfcsCallArgs
Source§fn clone(&self) -> UfcsCallArgs
fn clone(&self) -> UfcsCallArgs
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for UfcsCallArgs
impl Debug for UfcsCallArgs
impl Eq for UfcsCallArgs
Source§impl PartialEq for UfcsCallArgs
impl PartialEq for UfcsCallArgs
impl StructuralPartialEq for UfcsCallArgs
Auto Trait Implementations§
impl Freeze for UfcsCallArgs
impl RefUnwindSafe for UfcsCallArgs
impl Send for UfcsCallArgs
impl Sync for UfcsCallArgs
impl Unpin for UfcsCallArgs
impl UnsafeUnpin for UfcsCallArgs
impl UnwindSafe for UfcsCallArgs
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,
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
key and return true if they are equal.