Skip to main content

eq_ctxt_suggestion_span

Function eq_ctxt_suggestion_span 

Source
pub(crate) fn eq_ctxt_suggestion_span(pat: Span, ty: Span) -> Option<Span>
Expand description

Computes the pat.between(ty) span for the “use =” suggestion on let pat: ty. Returns None if pat and ty are in incompatible macro contexts (e.g. pat is a metavariable from the call site while ty lives in the macro body), in which case no suggestion is emitted.