pub fn variants_for_ty(
ty: TyId,
tys: &Types,
doc_text: &str,
files: Option<&HashMap<PathBuf, String>>,
) -> Vec<Completion>Expand description
v0.145 (ADR 0169, base gap for #565): the variants offerable for a scrutinee
Ty at a pattern position. A user-declared sum’s variants come from source
(sum_type_variants); the built-in Result/Option variants do not (they
are not declared types, so sum_type_variants can’t see them) and are
intrinsic here. This is why match-arm / is completion now fires for a
Result/Option scrutinee, not only a user sum.