about summary refs log tree commit diff
path: root/tests/ui/repr/repr-transparent-non-exhaustive-transparent-in-prose.rs
blob: 6ab34719f06640b4318c4193376db1b2d8fb24e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//@ check-pass

#![feature(sync_unsafe_cell)]
#![allow(unused)]
#![deny(repr_transparent_external_private_fields)]

// https://github.com/rust-lang/rust/issues/129470

struct ZST;

#[repr(transparent)]
struct TransparentWithManuallyDropZST {
    value: i32,
    md: std::mem::ManuallyDrop<ZST>,
    mu: std::mem::MaybeUninit<ZST>,
    p: std::pin::Pin<ZST>,
    pd: std::marker::PhantomData<ZST>,
    pp: std::marker::PhantomPinned,
    c: std::cell::Cell<ZST>,
    uc: std::cell::UnsafeCell<ZST>,
    suc: std::cell::SyncUnsafeCell<ZST>,
    zst: ZST,
}

fn main() {}