1
Fork 0

simplify merging of two vecs

This commit is contained in:
Matthias Krüger 2023-12-12 18:42:37 +01:00
parent 27d8a57713
commit 6892fcd690
2 changed files with 2 additions and 2 deletions

View file

@ -2178,7 +2178,7 @@ impl<'a: 'ast, 'ast, 'tcx> LateResolutionVisitor<'a, '_, 'ast, 'tcx> {
let (span, text) = match path.segments.first() {
Some(seg) if let Some(name) = seg.ident.as_str().strip_prefix("let") => {
// a special case for #117894
let name = name.strip_prefix("_").unwrap_or(name);
let name = name.strip_prefix('_').unwrap_or(name);
(ident_span, format!("let {name}"))
}
_ => (ident_span.shrink_to_lo(), "let ".to_string()),