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
|
let span = cx
|
||||||
.sess()
|
.sess()
|
||||||
.source_map()
|
.source_map()
|
||||||
.span_extend_while(usage.ident.span, |ch| ch.is_ascii_whitespace())
|
.span_extend_while_whitespace(usage.ident.span);
|
||||||
.unwrap_or(usage.ident.span);
|
|
||||||
|
|
||||||
(span, String::new())
|
(span, String::new())
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user