Include whitespace in "remove |" suggestion and make it hidden

This commit is contained in:
Esteban Küber
2025-03-01 22:27:16 +00:00
parent e5e79f8bd4
commit 2db126d651
11 changed files with 77 additions and 130 deletions

View File

@@ -1112,7 +1112,7 @@ impl<'a, G: EmissionGuarantee> Diag<'a, G> {
.map(|snippet| {
debug_assert!(
!(sp.is_empty() && snippet.is_empty()),
"Span must not be empty and have no suggestion"
"Span `{sp:?}` must not be empty and have no suggestion"
);
Substitution { parts: vec![SubstitutionPart { snippet, span: sp }] }
})