rustc: minor changes suggested by clippy perf lints.
This commit is contained in:
parent
9bd71afb90
commit
1b3733e5a4
4 changed files with 4 additions and 8 deletions
|
@ -1545,7 +1545,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
|||
let (span, sugg, post) = if let SuggestionTarget::SimilarlyNamed = suggestion.target
|
||||
&& let Ok(snippet) = self.tcx.sess.source_map().span_to_snippet(span)
|
||||
&& let Some(span) = suggestion.span
|
||||
&& let Some(candidate) = suggestion.candidate.as_str().strip_prefix("_")
|
||||
&& let Some(candidate) = suggestion.candidate.as_str().strip_prefix('_')
|
||||
&& snippet == candidate
|
||||
{
|
||||
// When the suggested binding change would be from `x` to `_x`, suggest changing the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue