diff options
| author | Jubilee <46493976+workingjubilee@users.noreply.github.com> | 2023-12-12 18:48:52 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-12 18:48:52 -0800 |
| commit | 89d4a9bee92efb3514cd7e255196163e965fab1f (patch) | |
| tree | cb2c698bd3bdd04923409ed47036802c7c6dacad /compiler/rustc_resolve | |
| parent | 18e0966f39d77db55d7b010c7b3761a8c1646876 (diff) | |
| parent | 2a1acc26a0533b82faa5ab18b56cff032e6ca3f9 (diff) | |
| download | rust-89d4a9bee92efb3514cd7e255196163e965fab1f.tar.gz rust-89d4a9bee92efb3514cd7e255196163e965fab1f.zip | |
Rollup merge of #118884 - matthiaskrgr:auszweimacheins, r=Nadrieril
NFC: simplify merging of two vecs
Diffstat (limited to 'compiler/rustc_resolve')
| -rw-r--r-- | compiler/rustc_resolve/src/late/diagnostics.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs index 61c7846ea61..374ce1a528f 100644 --- a/compiler/rustc_resolve/src/late/diagnostics.rs +++ b/compiler/rustc_resolve/src/late/diagnostics.rs @@ -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()), |
