about summary refs log tree commit diff
path: root/compiler/rustc_monomorphize/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-06-06 12:19:16 +0000
committerbors <bors@rust-lang.org>2025-06-06 12:19:16 +0000
commitf315e6145802e091ff9fceab6db627a4b4ec2b86 (patch)
treed69d62320a58ea2060ef381bc09d41e3146c360e /compiler/rustc_monomorphize/src
parentd00435f223dc3a88d8c5f472b10ba948b7959cc6 (diff)
parente12572f583f6b47e66537f2a9c0aa58db898384c (diff)
downloadrust-f315e6145802e091ff9fceab6db627a4b4ec2b86.tar.gz
rust-f315e6145802e091ff9fceab6db627a4b4ec2b86.zip
Auto merge of #142099 - matthiaskrgr:rollup-r9s3c35, r=matthiaskrgr
Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#125087 (Optimize `Seek::stream_len` impl for `File`)
 - rust-lang/rust#141982 (`tests/ui`: A New Order [5/N])
 - rust-lang/rust#142012 (Replace some `Option<Span>` with `Span` and use DUMMY_SP instead of None)
 - rust-lang/rust#142044 (compiler: Document the offset invariant of `OperandValue::Pair`)
 - rust-lang/rust#142047 (Ensure stack in two places that affect s390x)
 - rust-lang/rust#142058 (Clean `rustc_attr_parsing/src/lib.rs` documentation)
 - rust-lang/rust#142067 (canon_abi: make to_erased_extern_abi just a detail in formatting)
 - rust-lang/rust#142072 (doc: Fix inverted meaning in E0783.md)
 - rust-lang/rust#142084 (add myself to rotation)
 - rust-lang/rust#142091 (Fix AIX build)
 - rust-lang/rust#142092 (rustdoc: Support middle::ty associated const equality predicates again)

Failed merges:

 - rust-lang/rust#142042 (Make E0621 missing lifetime suggestion verbose)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_monomorphize/src')
-rw-r--r--compiler/rustc_monomorphize/src/collector.rs4
-rw-r--r--compiler/rustc_monomorphize/src/lib.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs
index 1ee977a5457..173030e0326 100644
--- a/compiler/rustc_monomorphize/src/collector.rs
+++ b/compiler/rustc_monomorphize/src/collector.rs
@@ -781,7 +781,7 @@ impl<'a, 'tcx> MirVisitor<'tcx> for MirUsedCollector<'a, 'tcx> {
 
         let tcx = self.tcx;
         let push_mono_lang_item = |this: &mut Self, lang_item: LangItem| {
-            let instance = Instance::mono(tcx, tcx.require_lang_item(lang_item, Some(source)));
+            let instance = Instance::mono(tcx, tcx.require_lang_item(lang_item, source));
             if tcx.should_codegen_locally(instance) {
                 this.used_items.push(create_fn_mono_item(tcx, instance, source));
             }
@@ -921,7 +921,7 @@ fn visit_instance_use<'tcx>(
             // be lowered in codegen to nothing or a call to panic_nounwind. So if we encounter any
             // of those intrinsics, we need to include a mono item for panic_nounwind, else we may try to
             // codegen a call to that function without generating code for the function itself.
-            let def_id = tcx.require_lang_item(LangItem::PanicNounwind, None);
+            let def_id = tcx.require_lang_item(LangItem::PanicNounwind, source);
             let panic_instance = Instance::mono(tcx, def_id);
             if tcx.should_codegen_locally(panic_instance) {
                 output.push(create_fn_mono_item(tcx, panic_instance, source));
diff --git a/compiler/rustc_monomorphize/src/lib.rs b/compiler/rustc_monomorphize/src/lib.rs
index 5c66017bc61..05683940cba 100644
--- a/compiler/rustc_monomorphize/src/lib.rs
+++ b/compiler/rustc_monomorphize/src/lib.rs
@@ -29,7 +29,7 @@ fn custom_coerce_unsize_info<'tcx>(
 ) -> Result<CustomCoerceUnsized, ErrorGuaranteed> {
     let trait_ref = ty::TraitRef::new(
         tcx.tcx,
-        tcx.require_lang_item(LangItem::CoerceUnsized, Some(tcx.span)),
+        tcx.require_lang_item(LangItem::CoerceUnsized, tcx.span),
         [source_ty, target_ty],
     );