summaryrefslogtreecommitdiffstats
path: root/tests/ui/print_type_sizes/zero-sized-fields.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/ui/print_type_sizes/zero-sized-fields.rs
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tests/ui/print_type_sizes/zero-sized-fields.rs (renamed from src/test/ui/print_type_sizes/zero-sized-fields.rs)8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/test/ui/print_type_sizes/zero-sized-fields.rs b/tests/ui/print_type_sizes/zero-sized-fields.rs
index e02a33109..09415824d 100644
--- a/src/test/ui/print_type_sizes/zero-sized-fields.rs
+++ b/tests/ui/print_type_sizes/zero-sized-fields.rs
@@ -1,12 +1,10 @@
-// compile-flags: -Z print-type-sizes
+// compile-flags: -Z print-type-sizes --crate-type=lib
// build-pass
// ignore-pass
// At one point, zero-sized fields such as those in this file were causing
// incorrect output from `-Z print-type-sizes`.
-#![feature(start)]
-
struct S1 {
x: u32,
y: u32,
@@ -28,8 +26,7 @@ struct S5<TagW, TagZ> {
tagz: TagZ,
}
-#[start]
-fn start(_: isize, _: *const *const u8) -> isize {
+pub fn test() {
let _s1: S1 = S1 { x: 0, y: 0, tag: () };
let _s5: S5<(), Empty> = S5 {
@@ -43,5 +40,4 @@ fn start(_: isize, _: *const *const u8) -> isize {
z: 4,
tagz: Empty {},
};
- 0
}