Add a helper for extending a span to include any trailing whitespace

This commit is contained in:
Michael Goulet 2024-04-07 19:38:05 -04:00
parent fa2db5a60b
commit d13ccf3392

View File

@ -294,8 +294,7 @@ fn elision_suggestions(
let span = cx
.sess()
.source_map()
.span_extend_while(usage.ident.span, |ch| ch.is_ascii_whitespace())
.unwrap_or(usage.ident.span);
.span_extend_while_whitespace(usage.ident.span);
(span, String::new())
},