diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-04-09 07:16:57 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-04-15 16:05:13 +1000 |
| commit | 2b43e664964bd6eeff6d0a1787ab2ef2a04f3e94 (patch) | |
| tree | f7be5d021719015ff1b9cc007f615f81bb4d8fc8 | |
| parent | f3847f0639c851224bb709444ae76865c0b1959b (diff) | |
| download | rust-2b43e664964bd6eeff6d0a1787ab2ef2a04f3e94.tar.gz rust-2b43e664964bd6eeff6d0a1787ab2ef2a04f3e94.zip | |
Remove a `kw::Empty` usage in symbol mangling.
Field names are never empty, so the unwrap is unnecessary.
| -rw-r--r-- | compiler/rustc_symbol_mangling/src/v0.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_symbol_mangling/src/v0.rs b/compiler/rustc_symbol_mangling/src/v0.rs index d28f10ba9e3..789de471ddc 100644 --- a/compiler/rustc_symbol_mangling/src/v0.rs +++ b/compiler/rustc_symbol_mangling/src/v0.rs @@ -776,7 +776,7 @@ impl<'tcx> Printer<'tcx> for SymbolMangler<'tcx> { self.push_disambiguator( disambiguated_field.disambiguator as u64, ); - self.push_ident(field_name.unwrap_or(kw::Empty).as_str()); + self.push_ident(field_name.unwrap().as_str()); field.print(self)?; } |
