Rollup merge of #138924 - nnethercote:less-kw-Empty-3, r=compiler-errors

Reduce `kw::Empty` usage, part 3

Remove some more `kw::Empty` uses, in support of #137978.

r? `@davidtwco`
This commit is contained in:
Matthias Krüger
2025-03-25 18:09:07 +01:00
committed by GitHub
13 changed files with 66 additions and 46 deletions

View File

@@ -2438,7 +2438,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
let Res::Def(DefKind::Macro(MacroKind::Bang), _) = binding.res() else {
return None;
};
let module_name = crate_module.kind.name().unwrap();
let module_name = crate_module.kind.name().unwrap_or(kw::Empty);
let import_snippet = match import.kind {
ImportKind::Single { source, target, .. } if source != target => {
format!("{source} as {target}")