summaryrefslogtreecommitdiffstats
path: root/tests/codegen-units/item-collection/tuple-drop-glue.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:58 +0000
commita4b7ed7a42c716ab9f05e351f003d589124fd55d (patch)
treeb620cd3f223850b28716e474e80c58059dca5dd4 /tests/codegen-units/item-collection/tuple-drop-glue.rs
parentAdding upstream version 1.67.1+dfsg1. (diff)
downloadrustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.tar.xz
rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.zip
Adding upstream version 1.68.2+dfsg1.upstream/1.68.2+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/codegen-units/item-collection/tuple-drop-glue.rs')
-rw-r--r--tests/codegen-units/item-collection/tuple-drop-glue.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/codegen-units/item-collection/tuple-drop-glue.rs b/tests/codegen-units/item-collection/tuple-drop-glue.rs
new file mode 100644
index 000000000..ae3b2e081
--- /dev/null
+++ b/tests/codegen-units/item-collection/tuple-drop-glue.rs
@@ -0,0 +1,27 @@
+//
+// compile-flags:-Zprint-mono-items=eager
+// compile-flags:-Zinline-in-all-cgus
+
+#![deny(dead_code)]
+#![feature(start)]
+
+//~ MONO_ITEM fn std::ptr::drop_in_place::<Dropped> - shim(Some(Dropped)) @@ tuple_drop_glue-cgu.0[Internal]
+struct Dropped;
+
+impl Drop for Dropped {
+ //~ MONO_ITEM fn <Dropped as std::ops::Drop>::drop
+ fn drop(&mut self) {}
+}
+
+//~ MONO_ITEM fn start
+#[start]
+fn start(_: isize, _: *const *const u8) -> isize {
+ //~ MONO_ITEM fn std::ptr::drop_in_place::<(u32, Dropped)> - shim(Some((u32, Dropped))) @@ tuple_drop_glue-cgu.0[Internal]
+ let x = (0u32, Dropped);
+
+ //~ MONO_ITEM fn std::ptr::drop_in_place::<(i16, (Dropped, bool))> - shim(Some((i16, (Dropped, bool)))) @@ tuple_drop_glue-cgu.0[Internal]
+ //~ MONO_ITEM fn std::ptr::drop_in_place::<(Dropped, bool)> - shim(Some((Dropped, bool))) @@ tuple_drop_glue-cgu.0[Internal]
+ let x = (0i16, (Dropped, true));
+
+ 0
+}