Skip to content

[POC] create an MVP for using Destruct for custom dtors - #156090

Draft
JayanAXHF wants to merge 11 commits into
rust-lang:mainfrom
JayanAXHF:feat/better_drop_semantics
Draft

[POC] create an MVP for using Destruct for custom dtors#156090
JayanAXHF wants to merge 11 commits into
rust-lang:mainfrom
JayanAXHF:feat/better_drop_semantics

Conversation

@JayanAXHF

@JayanAXHF JayanAXHF commented May 2, 2026

Copy link
Copy Markdown
Member

View all comments

  1. We redirect drop glue to Destruct::drop_in_place instead of mem::ptr::drop_in_place.
  2. Theres a new lang item for DestructDropInPlace
  3. The old solver checks for user candidates for impl in candidate_assembly, and only checks for builtin impl when it doesnt find one
  4. The new trait solver does something similar, and checks for user impls before calling assemble_builtin_impl_candidates

cc: @Nadrieril and @oli-obk (you were interested in reviewing this from the PG)

Note that this is a POC and i've not ironed out the comments and im not 100% confident that this is the best way to do this.

r? ghost

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels May 2, 2026
@rust-log-analyzer

This comment has been minimized.

@JayanAXHF
JayanAXHF force-pushed the feat/better_drop_semantics branch from 13224fe to e48ef91 Compare May 3, 2026 04:10
@rust-log-analyzer

This comment has been minimized.

@JayanAXHF
JayanAXHF force-pushed the feat/better_drop_semantics branch from e48ef91 to 30d34f8 Compare May 3, 2026 04:24
@rust-log-analyzer

This comment has been minimized.

@JayanAXHF
JayanAXHF force-pushed the feat/better_drop_semantics branch from 30d34f8 to 1a1e29a Compare May 3, 2026 04:33
@rust-log-analyzer

This comment has been minimized.

@JayanAXHF
JayanAXHF force-pushed the feat/better_drop_semantics branch from 1a1e29a to 74b13aa Compare May 3, 2026 05:05
@rust-log-analyzer

This comment has been minimized.

@JayanAXHF

Copy link
Copy Markdown
Member Author

welp i have no idea what this is. Is this due to smth with cg_clift? do i need to make changes there

@JayanAXHF

JayanAXHF commented May 3, 2026

Copy link
Copy Markdown
Member Author

fixed it i think, it was related to the minicores not being updated

@rustbot rustbot added A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-core-stubs` T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. labels May 3, 2026
@rust-log-analyzer

This comment has been minimized.

@oli-obk oli-obk mentioned this pull request May 3, 2026
@JayanAXHF

Copy link
Copy Markdown
Member Author

It was another mini_core smh

///
/// Generated by default if not implemented manually.
#[lang = "destruct_drop_in_place"]
unsafe fn drop_in_place(_to_drop: *mut Self);

@Nadrieril Nadrieril May 6, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To limit the amount of trait-related magic, I would rather do this:

Suggested change
unsafe fn drop_in_place(_to_drop: *mut Self);
/// Entrypoint for drop. Called when a value is still live at end of scope
/// if none of its fields have been moved out of.
///
/// The default implementation calls `Drop::drop` if implemented,
/// then recursively calls `drop_in_place` on each field in order.
#[lang = "destruct_drop_in_place"]
unsafe fn drop_in_place(to_drop: *mut Self) {
core::intrinsics::drop_in_place_shim(to_drop);
}

and then have the intrinsic be the only thing that's auto-generated.

View changes since the review

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO there isn't much trait magic right now; the resolver simply checks if there are any user impls, and only assembles builtin ones if there aren't any. IMO this indirection would be rather confusing and also might clash with Specialization

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have the opposite intuition: having a method that magically has a body generated for it is not something that exists in rust; only intrinsics do that. And I don't see why this would interact with specialization in any way. Moreover this has the benefit that if someone wants to they can call the auto-generated drop glue.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The person can still invoke Destruct::drop_in_place manually, although it causes smth like a double drop issue.

Hey i was dropped
test
Hey i was dropped

I'll work on this. If you're talking about having both a custom dtor and the default one, i see very little usecase for that. Maybe that's just my intuition, but i prefer some less indirection, as this approach makes it more obvious how drop is being called (its just a function call, rather than what Drop::drop did, which called ptr::drop_in_place)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean if I want to override Destruct::drop_in_place in a way that reuses the default thing, e.g. because you want to call it conditionally. I agree it's probably rare.

its just a function call, rather than what Drop::drop did, which called ptr::drop_in_place

I'm confused: Drop::drop never called ptr::drop_in_place.

Comment thread compiler/rustc_ty_utils/src/instance.rs Outdated
Comment on lines -41 to -67
if ty.needs_drop(tcx, typing_env) {
debug!(" => nontrivial drop glue");
match *ty.kind() {
ty::Coroutine(coroutine_def_id, ..) => {
// FIXME: sync drop of coroutine with async drop (generate both versions?)
// Currently just ignored
if tcx.optimized_mir(coroutine_def_id).coroutine_drop_async().is_some() {
ty::InstanceKind::DropGlue(def_id, None)
} else {
ty::InstanceKind::DropGlue(def_id, Some(ty))
}
}
ty::Closure(..)
| ty::CoroutineClosure(..)
| ty::Tuple(..)
| ty::Adt(..)
| ty::Dynamic(..)
| ty::Array(..)
| ty::Slice(..)
| ty::UnsafeBinder(..) => ty::InstanceKind::DropGlue(def_id, Some(ty)),
// Drop shims can only be built from ADTs.
_ => return Ok(None),
}
} else {
debug!(" => trivial drop glue");
ty::InstanceKind::DropGlue(def_id, None)
}

@Nadrieril Nadrieril May 6, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For perf reasons I expect we should keep some of this shortcutting. Also whatever's happening with async drop feels important, why is it ok to remove it?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll have a look soon, thanks for pointing this out

@JayanAXHF JayanAXHF May 6, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but why is that ok and why is that useful? Doesn't this return the wrong instance kind in some cases now?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not too familiar with what kinds of instances it can return. I'll look up on that and run the tests to find any regressions

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah so there was a bug where it wouldn't rebase the args in this early return. The fix was pretty simple

@JayanAXHF JayanAXHF Aug 4, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also i feel like this might actually be a perf regression. can we get a crater perf run or smth?

@rust-log-analyzer

This comment has been minimized.

@Nadrieril Nadrieril left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(github decided to not send my coments and make them review comments so I have to make a top-level review)

View changes since this review

Comment thread compiler/rustc_ty_utils/src/instance.rs Outdated
Comment on lines -41 to -67
if ty.needs_drop(tcx, typing_env) {
debug!(" => nontrivial drop glue");
match *ty.kind() {
ty::Coroutine(coroutine_def_id, ..) => {
// FIXME: sync drop of coroutine with async drop (generate both versions?)
// Currently just ignored
if tcx.optimized_mir(coroutine_def_id).coroutine_drop_async().is_some() {
ty::InstanceKind::DropGlue(def_id, None)
} else {
ty::InstanceKind::DropGlue(def_id, Some(ty))
}
}
ty::Closure(..)
| ty::CoroutineClosure(..)
| ty::Tuple(..)
| ty::Adt(..)
| ty::Dynamic(..)
| ty::Array(..)
| ty::Slice(..)
| ty::UnsafeBinder(..) => ty::InstanceKind::DropGlue(def_id, Some(ty)),
// Drop shims can only be built from ADTs.
_ => return Ok(None),
}
} else {
debug!(" => trivial drop glue");
ty::InstanceKind::DropGlue(def_id, None)
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but why is that ok and why is that useful? Doesn't this return the wrong instance kind in some cases now?

@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment has been minimized.

Comment on lines +143 to +156
if tcx.is_lang_item(trait_ref.def_id, LangItem::Destruct) {
if !tcx.is_lang_item(trait_item_id, LangItem::DestructDropInPlace) {
bug!(
"unexpected associated item for built-in `{trait_ref}`: {}",
tcx.item_name(trait_item_id)
);
}

debug!("Got user Destruct impl");
return Ok(Some(Instance {
def: ty::InstanceKind::Item(leaf_def.item.def_id),
args: rcvr_args,
}));
}

@Nadrieril Nadrieril May 6, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this early return useful/necessary? Please add a comment explaning its purpose

View changes since the review

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a comment for that. its basically to skip some of the rest of the code that deals with dyn Trait overlap and specialization because Destruct is neither object-safe nor does it have any specialization concerns here.

@Nadrieril

Copy link
Copy Markdown
Member

Per the recent #154327, our new methods should take &mut self instead of *mut self.

@JayanAXHF
JayanAXHF force-pushed the feat/better_drop_semantics branch from 4d422f9 to 4a6c469 Compare July 28, 2026 09:28
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@JayanAXHF
JayanAXHF force-pushed the feat/better_drop_semantics branch from cb29cb9 to d5f676f Compare September 5, 2026 09:31
@rustbot rustbot added the A-attributes Area: Attributes (`#[…]`, `#![…]`) label Sep 5, 2026
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job pr-check-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

---- [codegen] tests/codegen-llvm/array-drop-glue.rs#OPT stdout ----
------FileCheck stdout------------------------------

------FileCheck stderr------------------------------
/checkout/tests/codegen-llvm/array-drop-glue.rs:32:17: error: CHECK-LABEL: expected string not found in input
// CHECK-LABEL: ; core::ptr::drop_glue::<[array_drop_glue::NeedsDrop]>
                ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/array-drop-glue.OPT/array-drop-glue.ll:1:1: note: scanning from here
; ModuleID = 'array_drop_glue.710bb8d2f956acdb-cgu.0'
^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/array-drop-glue.OPT/array-drop-glue.ll:8:27: note: possible intended match here
define internal fastcc void @_RNvYSNtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropNtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef nonnull align 4 %_1.0, i32 noundef range(i32 7, 43) %_1.1) unnamed_addr #0 !guid !1 {
                          ^

Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/array-drop-glue.OPT/array-drop-glue.ll
Check file: /checkout/tests/codegen-llvm/array-drop-glue.rs

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1: ; ModuleID = 'array_drop_glue.710bb8d2f956acdb-cgu.0' 
label:32'0    {                                                        search range start (exclusive)
label:32'1                                                             error: no match found in search range
            2: source_filename = "array_drop_glue.710bb8d2f956acdb-cgu.0" 
            3: target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-i128:128-n32:64-S128-ni:1:10:20" 
            4: target triple = "wasm32-unknown-wasip1" 
            5:  
            6: ; <[array_drop_glue::NeedsDrop] as core::marker::Destruct>::drop_in_place 
            7: ; Function Attrs: minsize nounwind optsize 
            8: define internal fastcc void @_RNvYSNtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropNtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef nonnull align 4 %_1.0, i32 noundef range(i32 7, 43) %_1.1) unnamed_addr #0 !guid !1 { 
label:32'2                               ?                                                                                                                                                                                                                                possible intended match
            9: start: 
           10:  br label %bb3 
           11:  
           12: bb3: ; preds = %bb2, %start 
           13:  %_3.sroa.0.0 = phi i32 [ 0, %start ], [ %0, %bb2 ] 
           14:  %_7 = icmp eq i32 %_3.sroa.0.0, %_1.1 
           15:  br i1 %_7, label %bb1, label %bb2 
           16:  
           17: bb2: ; preds = %bb3 
           18:  %_6 = getelementptr inbounds nuw [4 x i8], ptr %_1.0, i32 %_3.sroa.0.0 
           19:  %0 = add nuw nsw i32 %_3.sroa.0.0, 1 
           20:  tail call void @do_the_drop(ptr noalias nofree noundef nonnull align 4 dereferenceable(4) %_6) #1 
           21:  br label %bb3 
           22:  
           23: bb1: ; preds = %bb3 
           24:  ret void 
           25: } 
           26:  
           27: ; Function Attrs: minsize nounwind optsize 
           28: define dso_local void @drop_arrays(ptr noalias nofree noundef align 4 captures(address) dead_on_return dereferenceable(28) %x, ptr noalias nofree noundef align 4 captures(address) dead_on_return dereferenceable(52) %y, ptr noalias nofree noundef align 4 captures(address) dead_on_return dereferenceable(168) %z) unnamed_addr #0 !guid !2 { 
           29: start: 
           30: ; call <[array_drop_glue::NeedsDrop] as core::marker::Destruct>::drop_in_place 
           31:  tail call fastcc void @_RNvYSNtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropNtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef nonnull align 4 dereferenceable(28) %x, i32 noundef 7) #1 
           32: ; call <[array_drop_glue::NeedsDrop] as core::marker::Destruct>::drop_in_place 
           33:  tail call fastcc void @_RNvYSNtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropNtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef nonnull align 4 dereferenceable(52) %y, i32 noundef 13) #1 
           34: ; call <[array_drop_glue::NeedsDrop] as core::marker::Destruct>::drop_in_place 
           35:  tail call fastcc void @_RNvYSNtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropNtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef nonnull align 4 dereferenceable(168) %z, i32 noundef 42) #1 
           36:  ret void 
           37: } 
           38:  
           39: ; Function Attrs: minsize nounwind optsize 
           40: declare dso_local void @do_the_drop(ptr noalias nofree noundef align 4 dereferenceable(4)) unnamed_addr #0 
           41:  
           42: attributes #0 = { minsize nounwind optsize "target-cpu"="generic" } 
           43: attributes #1 = { nounwind } 
           44:  
           45: !llvm.ident = !{!0} 
           46:  
           47: !0 = !{!"rustc version 1.100.0-nightly (ed1a7a824 2026-09-05)"} 
           48: !1 = !{i64 6274612000956611334} 
           49: !2 = !{i64 -679781454983157032} 
label:32'3                                     } search range end (exclusive)
>>>>>>

------------------------------------------

error in revision `OPT`: verification with 'FileCheck' failed
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm/bin/FileCheck" "--input-file" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/array-drop-glue.OPT/array-drop-glue.ll" "/checkout/tests/codegen-llvm/array-drop-glue.rs" "--check-prefix=CHECK" "--check-prefix" "OPT" "--allow-unused-prefixes" "--dump-input-context" "100"
stdout: none
--- stderr -------------------------------
/checkout/tests/codegen-llvm/array-drop-glue.rs:32:17: error: CHECK-LABEL: expected string not found in input
// CHECK-LABEL: ; core::ptr::drop_glue::<[array_drop_glue::NeedsDrop]>
                ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/array-drop-glue.OPT/array-drop-glue.ll:1:1: note: scanning from here
; ModuleID = 'array_drop_glue.710bb8d2f956acdb-cgu.0'
^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/array-drop-glue.OPT/array-drop-glue.ll:8:27: note: possible intended match here
define internal fastcc void @_RNvYSNtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropNtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef nonnull align 4 %_1.0, i32 noundef range(i32 7, 43) %_1.1) unnamed_addr #0 !guid !1 {
                          ^

Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/array-drop-glue.OPT/array-drop-glue.ll
Check file: /checkout/tests/codegen-llvm/array-drop-glue.rs

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1: ; ModuleID = 'array_drop_glue.710bb8d2f956acdb-cgu.0' 
label:32'0    {                                                        search range start (exclusive)
label:32'1                                                             error: no match found in search range
            2: source_filename = "array_drop_glue.710bb8d2f956acdb-cgu.0" 
            3: target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-i128:128-n32:64-S128-ni:1:10:20" 
            4: target triple = "wasm32-unknown-wasip1" 
            5:  
            6: ; <[array_drop_glue::NeedsDrop] as core::marker::Destruct>::drop_in_place 
            7: ; Function Attrs: minsize nounwind optsize 
            8: define internal fastcc void @_RNvYSNtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropNtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef nonnull align 4 %_1.0, i32 noundef range(i32 7, 43) %_1.1) unnamed_addr #0 !guid !1 { 
label:32'2                               ?                                                                                                                                                                                                                                possible intended match
            9: start: 
           10:  br label %bb3 
           11:  
           12: bb3: ; preds = %bb2, %start 
           13:  %_3.sroa.0.0 = phi i32 [ 0, %start ], [ %0, %bb2 ] 
           14:  %_7 = icmp eq i32 %_3.sroa.0.0, %_1.1 
           15:  br i1 %_7, label %bb1, label %bb2 
           16:  
           17: bb2: ; preds = %bb3 
           18:  %_6 = getelementptr inbounds nuw [4 x i8], ptr %_1.0, i32 %_3.sroa.0.0 
           19:  %0 = add nuw nsw i32 %_3.sroa.0.0, 1 
           20:  tail call void @do_the_drop(ptr noalias nofree noundef nonnull align 4 dereferenceable(4) %_6) #1 
           21:  br label %bb3 
           22:  
           23: bb1: ; preds = %bb3 
           24:  ret void 
           25: } 
           26:  
           27: ; Function Attrs: minsize nounwind optsize 
           28: define dso_local void @drop_arrays(ptr noalias nofree noundef align 4 captures(address) dead_on_return dereferenceable(28) %x, ptr noalias nofree noundef align 4 captures(address) dead_on_return dereferenceable(52) %y, ptr noalias nofree noundef align 4 captures(address) dead_on_return dereferenceable(168) %z) unnamed_addr #0 !guid !2 { 
           29: start: 
           30: ; call <[array_drop_glue::NeedsDrop] as core::marker::Destruct>::drop_in_place 
           31:  tail call fastcc void @_RNvYSNtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropNtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef nonnull align 4 dereferenceable(28) %x, i32 noundef 7) #1 
           32: ; call <[array_drop_glue::NeedsDrop] as core::marker::Destruct>::drop_in_place 
           33:  tail call fastcc void @_RNvYSNtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropNtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef nonnull align 4 dereferenceable(52) %y, i32 noundef 13) #1 
           34: ; call <[array_drop_glue::NeedsDrop] as core::marker::Destruct>::drop_in_place 
           35:  tail call fastcc void @_RNvYSNtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropNtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef nonnull align 4 dereferenceable(168) %z, i32 noundef 42) #1 
           36:  ret void 
           37: } 
           38:  
           39: ; Function Attrs: minsize nounwind optsize 
           40: declare dso_local void @do_the_drop(ptr noalias nofree noundef align 4 dereferenceable(4)) unnamed_addr #0 
           41:  
           42: attributes #0 = { minsize nounwind optsize "target-cpu"="generic" } 
           43: attributes #1 = { nounwind } 
           44:  
           45: !llvm.ident = !{!0} 
           46:  
           47: !0 = !{!"rustc version 1.100.0-nightly (ed1a7a824 2026-09-05)"} 
           48: !1 = !{i64 6274612000956611334} 
           49: !2 = !{i64 -679781454983157032} 
label:32'3                                     } search range end (exclusive)
>>>>>>
------------------------------------------

---- [codegen] tests/codegen-llvm/array-drop-glue.rs#OPT stdout end ----
---- [codegen] tests/codegen-llvm/array-drop-glue.rs#RAW stdout ----
------FileCheck stdout------------------------------

------FileCheck stderr------------------------------
/checkout/tests/codegen-llvm/array-drop-glue.rs:32:17: error: CHECK-LABEL: expected string not found in input
// CHECK-LABEL: ; core::ptr::drop_glue::<[array_drop_glue::NeedsDrop]>
                ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/array-drop-glue.RAW/array-drop-glue.ll:1:1: note: scanning from here
; ModuleID = 'array_drop_glue.710bb8d2f956acdb-cgu.0'
^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/array-drop-glue.RAW/array-drop-glue.ll:8:20: note: possible intended match here
define internal void @_RNvYANtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropj2a_NtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef align 4 dereferenceable(168) %_1) unnamed_addr #0 !guid !1 {
                   ^

Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/array-drop-glue.RAW/array-drop-glue.ll
Check file: /checkout/tests/codegen-llvm/array-drop-glue.rs

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1: ; ModuleID = 'array_drop_glue.710bb8d2f956acdb-cgu.0' 
label:32'0    {                                                        search range start (exclusive)
label:32'1                                                             error: no match found in search range
            2: source_filename = "array_drop_glue.710bb8d2f956acdb-cgu.0" 
            3: target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-i128:128-n32:64-S128-ni:1:10:20" 
            4: target triple = "wasm32-unknown-wasip1" 
            5:  
            6: ; <[array_drop_glue::NeedsDrop; 42] as core::marker::Destruct>::drop_in_place 
            7: ; Function Attrs: inlinehint minsize nounwind optsize 
            8: define internal void @_RNvYANtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropj2a_NtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef align 4 dereferenceable(168) %_1) unnamed_addr #0 !guid !1 { 
label:32'2                        ?                                                                                                                                                                                                           possible intended match
            9: start: 
           10: ; call <[array_drop_glue::NeedsDrop] as core::marker::Destruct>::drop_in_place 
           11:  call void @_RNvYSNtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropNtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef nonnull align 4 %_1, i32 noundef 42) #3 
           12:  ret void 
           13: } 
           14:  
           15: ; <[array_drop_glue::NeedsDrop; 7] as core::marker::Destruct>::drop_in_place 
           16: ; Function Attrs: inlinehint minsize nounwind optsize 
           17: define internal void @_RNvYANtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropj7_NtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef align 4 dereferenceable(28) %_1) unnamed_addr #0 !guid !2 { 
           18: start: 
           19: ; call <[array_drop_glue::NeedsDrop] as core::marker::Destruct>::drop_in_place 
           20:  call void @_RNvYSNtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropNtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef nonnull align 4 %_1, i32 noundef 7) #3 
           21:  ret void 
           22: } 
           23:  
           24: ; <[array_drop_glue::NeedsDrop; 13] as core::marker::Destruct>::drop_in_place 
           25: ; Function Attrs: inlinehint minsize nounwind optsize 
           26: define internal void @_RNvYANtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropjd_NtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef align 4 dereferenceable(52) %_1) unnamed_addr #0 !guid !3 { 
           27: start: 
           28: ; call <[array_drop_glue::NeedsDrop] as core::marker::Destruct>::drop_in_place 
           29:  call void @_RNvYSNtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropNtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef nonnull align 4 %_1, i32 noundef 13) #3 
           30:  ret void 
           31: } 
           32:  
           33: ; <array_drop_glue::NeedsDrop as core::marker::Destruct>::drop_in_place 
           34: ; Function Attrs: minsize nounwind optsize 
           35: define internal void @_RNvYNtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropNtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB4_(ptr noalias nofree noundef align 4 dereferenceable(4) %_1) unnamed_addr #1 !guid !4 { 
           36: start: 
           37: ; call <array_drop_glue::NeedsDrop as core::ops::drop::Drop>::drop 
           38:  call void @_RNvXCs9HJSSf6wjzj_15array_drop_glueNtB2_9NeedsDropNtNtNtCskHClMLRa1S6_4core3ops4drop4Drop4drop(ptr noalias nofree noundef align 4 dereferenceable(4) %_1) #4 
           39:  ret void 
           40: } 
           41:  
           42: ; <[array_drop_glue::NeedsDrop] as core::marker::Destruct>::drop_in_place 
           43: ; Function Attrs: minsize nounwind optsize 
           44: define internal void @_RNvYSNtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropNtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef nonnull align 4 %_1.0, i32 noundef range(i32 0, 536870912) %_1.1) unnamed_addr #1 !guid !5 { 
           45: start: 
           46:  %_3 = alloca [4 x i8], align 4 
           47:  store i32 0, ptr %_3, align 4 
           48:  br label %bb3 
           49:  
           50: bb3: ; preds = %bb2, %start 
           51:  %0 = load i32, ptr %_3, align 4, !noundef !6 
           52:  %_7 = icmp eq i32 %0, %_1.1 
           53:  br i1 %_7, label %bb1, label %bb2 
           54:  
           55: bb2: ; preds = %bb3 
           56:  %1 = load i32, ptr %_3, align 4, !noundef !6 
           57:  %_6 = getelementptr inbounds nuw i32, ptr %_1.0, i32 %1 
           58:  %2 = load i32, ptr %_3, align 4, !noundef !6 
           59:  %3 = add i32 %2, 1 
           60:  store i32 %3, ptr %_3, align 4 
           61: ; call <array_drop_glue::NeedsDrop as core::marker::Destruct>::drop_in_place 
           62:  call void @_RNvYNtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropNtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB4_(ptr noalias nofree noundef align 4 dereferenceable(4) %_6) #3 
           63:  br label %bb3 
           64:  
           65: bb1: ; preds = %bb3 
           66:  ret void 
           67: } 
           68:  
           69: ; Function Attrs: minsize nounwind optsize 
           70: define dso_local void @drop_arrays(ptr noalias nofree noundef readonly align 4 captures(none) dead_on_return dereferenceable(28) %x, ptr noalias nofree noundef readonly align 4 captures(none) dead_on_return dereferenceable(52) %y, ptr noalias nofree noundef readonly align 4 captures(none) dead_on_return dereferenceable(168) %z) unnamed_addr #1 !guid !7 { 
           71: start: 
           72:  %_6 = alloca [168 x i8], align 4 
           73:  %_5 = alloca [52 x i8], align 4 
           74:  %_4 = alloca [28 x i8], align 4 
           75:  call void @llvm.lifetime.start.p0(ptr %_4) 
           76:  call void @llvm.memcpy.p0.p0.i32(ptr align 4 %_4, ptr align 4 %x, i32 28, i1 false) 
           77: ; call <[array_drop_glue::NeedsDrop; 7] as core::marker::Destruct>::drop_in_place 
           78:  call void @_RNvYANtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropj7_NtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef align 4 dereferenceable(28) %_4) #4 
           79:  call void @llvm.lifetime.end.p0(ptr %_4) 
           80:  call void @llvm.lifetime.start.p0(ptr %_5) 
           81:  call void @llvm.memcpy.p0.p0.i32(ptr align 4 %_5, ptr align 4 %y, i32 52, i1 false) 
           82: ; call <[array_drop_glue::NeedsDrop; 13] as core::marker::Destruct>::drop_in_place 
           83:  call void @_RNvYANtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropjd_NtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef align 4 dereferenceable(52) %_5) #4 
           84:  call void @llvm.lifetime.end.p0(ptr %_5) 
           85:  call void @llvm.lifetime.start.p0(ptr %_6) 
           86:  call void @llvm.memcpy.p0.p0.i32(ptr align 4 %_6, ptr align 4 %z, i32 168, i1 false) 
           87: ; call <[array_drop_glue::NeedsDrop; 42] as core::marker::Destruct>::drop_in_place 
           88:  call void @_RNvYANtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropj2a_NtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef align 4 dereferenceable(168) %_6) #4 
           89:  call void @llvm.lifetime.end.p0(ptr %_6) 
           90:  ret void 
           91: } 
           92:  
           93: ; <array_drop_glue::NeedsDrop as core::ops::drop::Drop>::drop 
           94: ; Function Attrs: inlinehint minsize nounwind optsize 
           95: define internal void @_RNvXCs9HJSSf6wjzj_15array_drop_glueNtB2_9NeedsDropNtNtNtCskHClMLRa1S6_4core3ops4drop4Drop4drop(ptr noalias nofree noundef align 4 dereferenceable(4) %self) unnamed_addr #0 !guid !8 { 
           96: start: 
           97:  call void @do_the_drop(ptr noalias nofree noundef align 4 dereferenceable(4) %self) #3 
           98:  ret void 
           99: } 
          100:  
          101: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) 
          102: declare void @llvm.lifetime.start.p0(ptr captures(none)) #2 
          103:  
          104: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) 
          105: declare void @llvm.memcpy.p0.p0.i32(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i32, i1 immarg) #2 
          106:  
          107: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) 
          108: declare void @llvm.lifetime.end.p0(ptr captures(none)) #2 
          109:  
          110: ; Function Attrs: minsize nounwind optsize 
          111: declare dso_local void @do_the_drop(ptr noalias nofree noundef align 4 dereferenceable(4)) unnamed_addr #1 
          112:  
          113: attributes #0 = { inlinehint minsize nounwind optsize "target-cpu"="generic" } 
          114: attributes #1 = { minsize nounwind optsize "target-cpu"="generic" } 
          115: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } 
          116: attributes #3 = { nounwind } 
          117: attributes #4 = { inlinehint nounwind } 
          118:  
          119: !llvm.ident = !{!0} 
          120:  
          121: !0 = !{!"rustc version 1.100.0-nightly (ed1a7a824 2026-09-05)"} 
          122: !1 = !{i64 8934640493854859643} 
          123: !2 = !{i64 2590851507195095265} 
          124: !3 = !{i64 1168480855742123961} 
          125: !4 = !{i64 -6303165475849694522} 
          126: !5 = !{i64 6274612000956611334} 
          127: !6 = !{} 
          128: !7 = !{i64 -679781454983157032} 
          129: !8 = !{i64 4258750481789303679} 
label:32'3                                     } search range end (exclusive)
>>>>>>

------------------------------------------

error in revision `RAW`: verification with 'FileCheck' failed
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm/bin/FileCheck" "--input-file" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/array-drop-glue.RAW/array-drop-glue.ll" "/checkout/tests/codegen-llvm/array-drop-glue.rs" "--check-prefix=CHECK" "--check-prefix" "RAW" "--allow-unused-prefixes" "--dump-input-context" "100"
stdout: none
--- stderr -------------------------------
/checkout/tests/codegen-llvm/array-drop-glue.rs:32:17: error: CHECK-LABEL: expected string not found in input
// CHECK-LABEL: ; core::ptr::drop_glue::<[array_drop_glue::NeedsDrop]>
                ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/array-drop-glue.RAW/array-drop-glue.ll:1:1: note: scanning from here
; ModuleID = 'array_drop_glue.710bb8d2f956acdb-cgu.0'
^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/array-drop-glue.RAW/array-drop-glue.ll:8:20: note: possible intended match here
define internal void @_RNvYANtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropj2a_NtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef align 4 dereferenceable(168) %_1) unnamed_addr #0 !guid !1 {
                   ^

Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/array-drop-glue.RAW/array-drop-glue.ll
Check file: /checkout/tests/codegen-llvm/array-drop-glue.rs

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1: ; ModuleID = 'array_drop_glue.710bb8d2f956acdb-cgu.0' 
label:32'0    {                                                        search range start (exclusive)
label:32'1                                                             error: no match found in search range
            2: source_filename = "array_drop_glue.710bb8d2f956acdb-cgu.0" 
            3: target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-i128:128-n32:64-S128-ni:1:10:20" 
            4: target triple = "wasm32-unknown-wasip1" 
            5:  
            6: ; <[array_drop_glue::NeedsDrop; 42] as core::marker::Destruct>::drop_in_place 
            7: ; Function Attrs: inlinehint minsize nounwind optsize 
            8: define internal void @_RNvYANtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropj2a_NtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef align 4 dereferenceable(168) %_1) unnamed_addr #0 !guid !1 { 
label:32'2                        ?                                                                                                                                                                                                           possible intended match
            9: start: 
           10: ; call <[array_drop_glue::NeedsDrop] as core::marker::Destruct>::drop_in_place 
           11:  call void @_RNvYSNtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropNtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef nonnull align 4 %_1, i32 noundef 42) #3 
           12:  ret void 
           13: } 
           14:  
           15: ; <[array_drop_glue::NeedsDrop; 7] as core::marker::Destruct>::drop_in_place 
           16: ; Function Attrs: inlinehint minsize nounwind optsize 
           17: define internal void @_RNvYANtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropj7_NtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef align 4 dereferenceable(28) %_1) unnamed_addr #0 !guid !2 { 
           18: start: 
           19: ; call <[array_drop_glue::NeedsDrop] as core::marker::Destruct>::drop_in_place 
           20:  call void @_RNvYSNtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropNtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef nonnull align 4 %_1, i32 noundef 7) #3 
           21:  ret void 
           22: } 
           23:  
           24: ; <[array_drop_glue::NeedsDrop; 13] as core::marker::Destruct>::drop_in_place 
           25: ; Function Attrs: inlinehint minsize nounwind optsize 
           26: define internal void @_RNvYANtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropjd_NtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef align 4 dereferenceable(52) %_1) unnamed_addr #0 !guid !3 { 
           27: start: 
           28: ; call <[array_drop_glue::NeedsDrop] as core::marker::Destruct>::drop_in_place 
           29:  call void @_RNvYSNtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropNtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef nonnull align 4 %_1, i32 noundef 13) #3 
           30:  ret void 
           31: } 
           32:  
           33: ; <array_drop_glue::NeedsDrop as core::marker::Destruct>::drop_in_place 
           34: ; Function Attrs: minsize nounwind optsize 
           35: define internal void @_RNvYNtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropNtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB4_(ptr noalias nofree noundef align 4 dereferenceable(4) %_1) unnamed_addr #1 !guid !4 { 
           36: start: 
           37: ; call <array_drop_glue::NeedsDrop as core::ops::drop::Drop>::drop 
           38:  call void @_RNvXCs9HJSSf6wjzj_15array_drop_glueNtB2_9NeedsDropNtNtNtCskHClMLRa1S6_4core3ops4drop4Drop4drop(ptr noalias nofree noundef align 4 dereferenceable(4) %_1) #4 
           39:  ret void 
           40: } 
           41:  
           42: ; <[array_drop_glue::NeedsDrop] as core::marker::Destruct>::drop_in_place 
           43: ; Function Attrs: minsize nounwind optsize 
           44: define internal void @_RNvYSNtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropNtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef nonnull align 4 %_1.0, i32 noundef range(i32 0, 536870912) %_1.1) unnamed_addr #1 !guid !5 { 
           45: start: 
           46:  %_3 = alloca [4 x i8], align 4 
           47:  store i32 0, ptr %_3, align 4 
           48:  br label %bb3 
           49:  
           50: bb3: ; preds = %bb2, %start 
           51:  %0 = load i32, ptr %_3, align 4, !noundef !6 
           52:  %_7 = icmp eq i32 %0, %_1.1 
           53:  br i1 %_7, label %bb1, label %bb2 
           54:  
           55: bb2: ; preds = %bb3 
           56:  %1 = load i32, ptr %_3, align 4, !noundef !6 
           57:  %_6 = getelementptr inbounds nuw i32, ptr %_1.0, i32 %1 
           58:  %2 = load i32, ptr %_3, align 4, !noundef !6 
           59:  %3 = add i32 %2, 1 
           60:  store i32 %3, ptr %_3, align 4 
           61: ; call <array_drop_glue::NeedsDrop as core::marker::Destruct>::drop_in_place 
           62:  call void @_RNvYNtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropNtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB4_(ptr noalias nofree noundef align 4 dereferenceable(4) %_6) #3 
           63:  br label %bb3 
           64:  
           65: bb1: ; preds = %bb3 
           66:  ret void 
           67: } 
           68:  
           69: ; Function Attrs: minsize nounwind optsize 
           70: define dso_local void @drop_arrays(ptr noalias nofree noundef readonly align 4 captures(none) dead_on_return dereferenceable(28) %x, ptr noalias nofree noundef readonly align 4 captures(none) dead_on_return dereferenceable(52) %y, ptr noalias nofree noundef readonly align 4 captures(none) dead_on_return dereferenceable(168) %z) unnamed_addr #1 !guid !7 { 
           71: start: 
           72:  %_6 = alloca [168 x i8], align 4 
           73:  %_5 = alloca [52 x i8], align 4 
           74:  %_4 = alloca [28 x i8], align 4 
           75:  call void @llvm.lifetime.start.p0(ptr %_4) 
           76:  call void @llvm.memcpy.p0.p0.i32(ptr align 4 %_4, ptr align 4 %x, i32 28, i1 false) 
           77: ; call <[array_drop_glue::NeedsDrop; 7] as core::marker::Destruct>::drop_in_place 
           78:  call void @_RNvYANtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropj7_NtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef align 4 dereferenceable(28) %_4) #4 
           79:  call void @llvm.lifetime.end.p0(ptr %_4) 
           80:  call void @llvm.lifetime.start.p0(ptr %_5) 
           81:  call void @llvm.memcpy.p0.p0.i32(ptr align 4 %_5, ptr align 4 %y, i32 52, i1 false) 
           82: ; call <[array_drop_glue::NeedsDrop; 13] as core::marker::Destruct>::drop_in_place 
           83:  call void @_RNvYANtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropjd_NtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef align 4 dereferenceable(52) %_5) #4 
           84:  call void @llvm.lifetime.end.p0(ptr %_5) 
           85:  call void @llvm.lifetime.start.p0(ptr %_6) 
           86:  call void @llvm.memcpy.p0.p0.i32(ptr align 4 %_6, ptr align 4 %z, i32 168, i1 false) 
           87: ; call <[array_drop_glue::NeedsDrop; 42] as core::marker::Destruct>::drop_in_place 
           88:  call void @_RNvYANtCs9HJSSf6wjzj_15array_drop_glue9NeedsDropj2a_NtNtCskHClMLRa1S6_4core6marker8Destruct13drop_in_placeB5_(ptr noalias nofree noundef align 4 dereferenceable(168) %_6) #4 
           89:  call void @llvm.lifetime.end.p0(ptr %_6) 
           90:  ret void 
           91: } 
           92:  
           93: ; <array_drop_glue::NeedsDrop as core::ops::drop::Drop>::drop 
           94: ; Function Attrs: inlinehint minsize nounwind optsize 
           95: define internal void @_RNvXCs9HJSSf6wjzj_15array_drop_glueNtB2_9NeedsDropNtNtNtCskHClMLRa1S6_4core3ops4drop4Drop4drop(ptr noalias nofree noundef align 4 dereferenceable(4) %self) unnamed_addr #0 !guid !8 { 
           96: start: 
           97:  call void @do_the_drop(ptr noalias nofree noundef align 4 dereferenceable(4) %self) #3 
           98:  ret void 
           99: } 
          100:  
          101: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) 
          102: declare void @llvm.lifetime.start.p0(ptr captures(none)) #2 
          103:  
          104: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) 
          105: declare void @llvm.memcpy.p0.p0.i32(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i32, i1 immarg) #2 
          106:  
          107: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) 
          108: declare void @llvm.lifetime.end.p0(ptr captures(none)) #2 
          109:  
          110: ; Function Attrs: minsize nounwind optsize 
          111: declare dso_local void @do_the_drop(ptr noalias nofree noundef align 4 dereferenceable(4)) unnamed_addr #1 
          112:  
          113: attributes #0 = { inlinehint minsize nounwind optsize "target-cpu"="generic" } 
          114: attributes #1 = { minsize nounwind optsize "target-cpu"="generic" } 
          115: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } 
          116: attributes #3 = { nounwind } 
          117: attributes #4 = { inlinehint nounwind } 
          118:  
          119: !llvm.ident = !{!0} 
          120:  
          121: !0 = !{!"rustc version 1.100.0-nightly (ed1a7a824 2026-09-05)"} 
          122: !1 = !{i64 8934640493854859643} 
          123: !2 = !{i64 2590851507195095265} 
          124: !3 = !{i64 1168480855742123961} 
          125: !4 = !{i64 -6303165475849694522} 
          126: !5 = !{i64 6274612000956611334} 
          127: !6 = !{} 
          128: !7 = !{i64 -679781454983157032} 
          129: !8 = !{i64 4258750481789303679} 
label:32'3                                     } search range end (exclusive)
>>>>>>
------------------------------------------

---- [codegen] tests/codegen-llvm/array-drop-glue.rs#RAW stdout end ----
---- [codegen] tests/codegen-llvm/drop-in-place-noalias.rs stdout ----
------FileCheck stdout------------------------------

------FileCheck stderr------------------------------
/checkout/tests/codegen-llvm/drop-in-place-noalias.rs:10:11: error: CHECK: expected string not found in input
// CHECK: define internal void @{{.*}}core{{.*}}ptr{{.*}}drop_in_place{{.*}}StructUnpin{{.*}}(ptr noalias nofree noundef align 4 dereferenceable(12) %{{.+}})
          ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/drop-in-place-noalias/drop-in-place-noalias.ll:1:1: note: scanning from here
; ModuleID = 'drop_in_place_noalias.d3bd3bc72675f241-cgu.0'
^

Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/drop-in-place-noalias/drop-in-place-noalias.ll
Check file: /checkout/tests/codegen-llvm/drop-in-place-noalias.rs

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1: ; ModuleID = 'drop_in_place_noalias.d3bd3bc72675f241-cgu.0' 
check:10'0    {                                                              search range start (exclusive)
check:10'1                                                                   error: no match found in search range
            2: source_filename = "drop_in_place_noalias.d3bd3bc72675f241-cgu.0" 
            3: target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-i128:128-n32:64-S128-ni:1:10:20" 
            4: target triple = "wasm32-unknown-wasip1" 
            5:  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-core-stubs` S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants