mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
Add a helper for extending a span to include any trailing whitespace
This commit is contained in:
parent
fa2db5a60b
commit
d13ccf3392
@ -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())
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user