fn maybe_suggest_unit_pattern_typo<'tcx>(
tcx: TyCtxt<'tcx>,
body_def_id: DefId,
name: Symbol,
span: Span,
ty: Ty<'tcx>,
) -> Option<PatternTypo>
Expand description
Give a diagnostic when an unused variable may be a typo of a unit variant or a struct.