diff options
| author | Oli Scherer <github333195615777966@oli-obk.de> | 2025-06-04 06:26:56 +0000 |
|---|---|---|
| committer | Oli Scherer <github333195615777966@oli-obk.de> | 2025-06-05 14:14:59 +0000 |
| commit | fd3da4bebdff63b7529483ff7025986ef16bf463 (patch) | |
| tree | 9e2230b8a3afb9b4096cf3c8554c93273caa04af /compiler/rustc_sanitizers | |
| parent | 81a964c23ea4fe9ab52b4449bb166bf280035797 (diff) | |
| download | rust-fd3da4bebdff63b7529483ff7025986ef16bf463.tar.gz rust-fd3da4bebdff63b7529483ff7025986ef16bf463.zip | |
Replace some `Option<Span>` with `Span` and use DUMMY_SP instead of None
Diffstat (limited to 'compiler/rustc_sanitizers')
| -rw-r--r-- | compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/transform.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/transform.rs b/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/transform.rs index d2917478e4e..c69991f3fb2 100644 --- a/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/transform.rs +++ b/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/transform.rs @@ -14,7 +14,7 @@ use rustc_middle::ty::{ TyCtxt, TypeFoldable, TypeFolder, TypeSuperFoldable, TypeVisitableExt, UintTy, }; use rustc_span::def_id::DefId; -use rustc_span::sym; +use rustc_span::{DUMMY_SP, sym}; use rustc_trait_selection::traits; use tracing::{debug, instrument}; @@ -414,7 +414,7 @@ pub(crate) fn transform_instance<'tcx>( } ty::Coroutine(..) => match tcx.coroutine_kind(instance.def_id()).unwrap() { hir::CoroutineKind::Coroutine(..) => ( - tcx.require_lang_item(LangItem::Coroutine, None), + tcx.require_lang_item(LangItem::Coroutine, DUMMY_SP), Some(instance.args.as_coroutine().resume_ty()), ), hir::CoroutineKind::Desugared(desugaring, _) => { @@ -423,11 +423,11 @@ pub(crate) fn transform_instance<'tcx>( hir::CoroutineDesugaring::AsyncGen => LangItem::AsyncIterator, hir::CoroutineDesugaring::Gen => LangItem::Iterator, }; - (tcx.require_lang_item(lang_item, None), None) + (tcx.require_lang_item(lang_item, DUMMY_SP), None) } }, ty::CoroutineClosure(..) => ( - tcx.require_lang_item(LangItem::FnOnce, None), + tcx.require_lang_item(LangItem::FnOnce, DUMMY_SP), Some( tcx.instantiate_bound_regions_with_erased( instance.args.as_coroutine_closure().coroutine_closure_sig(), |
