Add MaybeDangling by WaffleLapkin · Pull Request #149614 · rust-lang/rust (original) (raw)


---- [codegen] tests/codegen-llvm/manually_drop_refs.rs stdout ----
------FileCheck stdout------------------------------

------FileCheck stderr------------------------------
/checkout/tests/codegen-llvm/manually_drop_refs.rs:6:11: error: CHECK: expected string not found in input
// CHECK: define noundef nonnull ptr @f(ptr noundef nonnull readnone returned {{(captures\(ret: address, provenance\))?}} %x) unnamed_addr
          ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/manually_drop_refs/manually_drop_refs.ll:1:1: note: scanning from here
; ModuleID = 'manually_drop_refs.f6bd3c5d90b64e2d-cgu.0'
^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/manually_drop_refs/manually_drop_refs.ll:7:1: note: possible intended match here
define noundef nonnull ptr @f(ptr noundef nonnull readnone returned %x) unnamed_addr #0 {
^

Input file: /checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/manually_drop_refs/manually_drop_refs.ll
Check file: /checkout/tests/codegen-llvm/manually_drop_refs.rs

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

Input was:
<<<<<<
           1: ; ModuleID = 'manually_drop_refs.f6bd3c5d90b64e2d-cgu.0' 
check:6'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
           2: source_filename = "manually_drop_refs.f6bd3c5d90b64e2d-cgu.0" 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           3: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32" 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           4: target triple = "aarch64-unknown-linux-gnu" 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           5:  
check:6'0     ~
           6: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           7: define noundef nonnull ptr @f(ptr noundef nonnull readnone returned %x) unnamed_addr #0 { 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:6'1     ?                                                                                          possible intended match
           8: start: 
check:6'0     ~~~~~~~
           9:  ret ptr %x 
check:6'0     ~~~~~~~~~~~~
          10: } 
check:6'0     ~~
          11:  
check:6'0     ~
          12: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          13: define noundef nonnull ptr @g(ptr noundef nonnull readnone returned %x) unnamed_addr #0 { 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          14: start: 
check:6'0     ~~~~~~~
          15:  ret ptr %x 
check:6'0     ~~~~~~~~~~~~
          16: } 
check:6'0     ~~
          17:  
check:6'0     ~
          18: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          19: define noundef nonnull ptr @h(ptr noundef nonnull readnone returned %x) unnamed_addr #0 { 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          20: start: 
check:6'0     ~~~~~~~
          21:  ret ptr %x 
check:6'0     ~~~~~~~~~~~~
          22: } 
check:6'0     ~~
          23:  
check:6'0     ~
          24: attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "frame-pointer"="non-leaf" "probe-stack"="inline-asm" "target-cpu"="generic" "target-features"="+v8a,+outline-atomics" } 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          25:  
check:6'0     ~
          26: !llvm.module.flags = !{!0} 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
          27: !llvm.ident = !{!1} 
check:6'0     ~~~~~~~~~~~~~~~~~~~~
          28:  
check:6'0     ~
          29: !0 = !{i32 8, !"PIC Level", i32 2} 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          30: !1 = !{!"rustc version 1.94.0-nightly (e68ce10dd 2025-12-14)"} 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>>>>

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

error: verification with 'FileCheck' failed
status: exit status: 1
command: "/usr/lib/llvm-20/bin/FileCheck" "--input-file" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/manually_drop_refs/manually_drop_refs.ll" "/checkout/tests/codegen-llvm/manually_drop_refs.rs" "--check-prefix=CHECK" "--allow-unused-prefixes" "--dump-input-context" "100"
stdout: none
--- stderr -------------------------------
/checkout/tests/codegen-llvm/manually_drop_refs.rs:6:11: error: CHECK: expected string not found in input
// CHECK: define noundef nonnull ptr @f(ptr noundef nonnull readnone returned {{(captures\(ret: address, provenance\))?}} %x) unnamed_addr
          ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/manually_drop_refs/manually_drop_refs.ll:1:1: note: scanning from here
; ModuleID = 'manually_drop_refs.f6bd3c5d90b64e2d-cgu.0'
^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/manually_drop_refs/manually_drop_refs.ll:7:1: note: possible intended match here
define noundef nonnull ptr @f(ptr noundef nonnull readnone returned %x) unnamed_addr #0 {
^

Input file: /checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/manually_drop_refs/manually_drop_refs.ll
Check file: /checkout/tests/codegen-llvm/manually_drop_refs.rs

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

Input was:
<<<<<<
           1: ; ModuleID = 'manually_drop_refs.f6bd3c5d90b64e2d-cgu.0' 
check:6'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
           2: source_filename = "manually_drop_refs.f6bd3c5d90b64e2d-cgu.0" 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           3: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32" 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           4: target triple = "aarch64-unknown-linux-gnu" 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           5:  
check:6'0     ~
           6: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           7: define noundef nonnull ptr @f(ptr noundef nonnull readnone returned %x) unnamed_addr #0 { 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:6'1     ?                                                                                          possible intended match
           8: start: 
check:6'0     ~~~~~~~
           9:  ret ptr %x 
check:6'0     ~~~~~~~~~~~~
          10: } 
check:6'0     ~~
          11:  
check:6'0     ~
          12: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          13: define noundef nonnull ptr @g(ptr noundef nonnull readnone returned %x) unnamed_addr #0 { 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          14: start: 
check:6'0     ~~~~~~~
          15:  ret ptr %x 
check:6'0     ~~~~~~~~~~~~
          16: } 
check:6'0     ~~
          17:  
check:6'0     ~
          18: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          19: define noundef nonnull ptr @h(ptr noundef nonnull readnone returned %x) unnamed_addr #0 { 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          20: start: 
check:6'0     ~~~~~~~
          21:  ret ptr %x 
check:6'0     ~~~~~~~~~~~~
          22: } 
check:6'0     ~~
          23:  
check:6'0     ~
          24: attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "frame-pointer"="non-leaf" "probe-stack"="inline-asm" "target-cpu"="generic" "target-features"="+v8a,+outline-atomics" } 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          25:  
check:6'0     ~
          26: !llvm.module.flags = !{!0} 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
          27: !llvm.ident = !{!1} 
check:6'0     ~~~~~~~~~~~~~~~~~~~~
          28:  
check:6'0     ~
          29: !0 = !{i32 8, !"PIC Level", i32 2} 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          30: !1 = !{!"rustc version 1.94.0-nightly (e68ce10dd 2025-12-14)"} 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>>>>
------------------------------------------

---- [codegen] tests/codegen-llvm/manually_drop_refs.rs stdout end ----