Skip to content

Commit

Permalink
Add a helper for extending a span to include any trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Apr 9, 2024
1 parent fa2db5a commit d13ccf3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions clippy_lints/src/lifetimes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
},
Expand Down

0 comments on commit d13ccf3

Please sign in to comment.