Rollup merge of #142012 - oli-obk:no-optional-spans, r=fee1-dead

Replace some `Option<Span>` with `Span` and use DUMMY_SP instead of None

Turns out many locations actually have a span available that we could use, so I used it
This commit is contained in:
Matthias Krüger
2025-06-06 00:58:44 +02:00
committed by GitHub
77 changed files with 250 additions and 250 deletions

View File

@@ -732,7 +732,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
span: Span,
args: Option<&'hir hir::GenericArgs<'hir>>,
) -> &'hir hir::Path<'hir> {
let def_id = self.tcx.require_lang_item(lang_item, Some(span));
let def_id = self.tcx.require_lang_item(lang_item, span);
let def_kind = self.tcx.def_kind(def_id);
let res = Res::Def(def_kind, def_id);
self.arena.alloc(hir::Path {