Rollup merge of #101357 - compiler-errors:variant-sugg-tweak, r=oli-obk
Include enum path in variant suggestion (except for `Result` and `Option`, which we should have via the prelude) Fixes #101356
This commit is contained in:
commit
d13aefdc65
54 changed files with 260 additions and 244 deletions
|
@ -754,8 +754,8 @@ fn lint_non_exhaustive_omitted_patterns<'p, 'tcx>(
|
|||
hir_id: HirId,
|
||||
witnesses: Vec<DeconstructedPat<'p, 'tcx>>,
|
||||
) {
|
||||
let joined_patterns = joined_uncovered_patterns(cx, &witnesses);
|
||||
cx.tcx.struct_span_lint_hir(NON_EXHAUSTIVE_OMITTED_PATTERNS, hir_id, sp, |build| {
|
||||
let joined_patterns = joined_uncovered_patterns(cx, &witnesses);
|
||||
let mut lint = build.build("some variants are not matched explicitly");
|
||||
lint.span_label(sp, pattern_not_covered_label(&witnesses, &joined_patterns));
|
||||
lint.help(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue