summaryrefslogtreecommitdiffstats
path: root/src/test/ui/repr/repr-transparent-non-exhaustive.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 /src/test/ui/repr/repr-transparent-non-exhaustive.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 'src/test/ui/repr/repr-transparent-non-exhaustive.rs')
-rw-r--r--src/test/ui/repr/repr-transparent-non-exhaustive.rs96
1 files changed, 0 insertions, 96 deletions
diff --git a/src/test/ui/repr/repr-transparent-non-exhaustive.rs b/src/test/ui/repr/repr-transparent-non-exhaustive.rs
deleted file mode 100644
index 506f1dcf3..000000000
--- a/src/test/ui/repr/repr-transparent-non-exhaustive.rs
+++ /dev/null
@@ -1,96 +0,0 @@
-#![deny(repr_transparent_external_private_fields)]
-
-// aux-build: repr-transparent-non-exhaustive.rs
-extern crate repr_transparent_non_exhaustive;
-
-use repr_transparent_non_exhaustive::{
- Private,
- NonExhaustive,
- NonExhaustiveEnum,
- NonExhaustiveVariant,
- ExternalIndirection,
-};
-
-pub struct InternalPrivate {
- _priv: (),
-}
-
-#[non_exhaustive]
-pub struct InternalNonExhaustive;
-
-pub struct InternalIndirection<T> {
- x: T,
-}
-
-pub type Sized = i32;
-
-#[repr(transparent)]
-pub struct T1(Sized, InternalPrivate);
-#[repr(transparent)]
-pub struct T2(Sized, InternalNonExhaustive);
-#[repr(transparent)]
-pub struct T3(Sized, InternalIndirection<(InternalPrivate, InternalNonExhaustive)>);
-#[repr(transparent)]
-pub struct T4(Sized, ExternalIndirection<(InternalPrivate, InternalNonExhaustive)>);
-
-#[repr(transparent)]
-pub struct T5(Sized, Private);
-//~^ ERROR zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
-//~| WARN this was previously accepted by the compiler
-
-#[repr(transparent)]
-pub struct T6(Sized, NonExhaustive);
-//~^ ERROR zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
-//~| WARN this was previously accepted by the compiler
-
-#[repr(transparent)]
-pub struct T7(Sized, NonExhaustiveEnum);
-//~^ ERROR zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
-//~| WARN this was previously accepted by the compiler
-
-#[repr(transparent)]
-pub struct T8(Sized, NonExhaustiveVariant);
-//~^ ERROR zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
-//~| WARN this was previously accepted by the compiler
-
-#[repr(transparent)]
-pub struct T9(Sized, InternalIndirection<Private>);
-//~^ ERROR zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
-//~| WARN this was previously accepted by the compiler
-
-#[repr(transparent)]
-pub struct T10(Sized, InternalIndirection<NonExhaustive>);
-//~^ ERROR zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
-//~| WARN this was previously accepted by the compiler
-
-#[repr(transparent)]
-pub struct T11(Sized, InternalIndirection<NonExhaustiveEnum>);
-//~^ ERROR zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
-//~| WARN this was previously accepted by the compiler
-
-#[repr(transparent)]
-pub struct T12(Sized, InternalIndirection<NonExhaustiveVariant>);
-//~^ ERROR zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
-//~| WARN this was previously accepted by the compiler
-
-#[repr(transparent)]
-pub struct T13(Sized, ExternalIndirection<Private>);
-//~^ ERROR zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
-//~| WARN this was previously accepted by the compiler
-
-#[repr(transparent)]
-pub struct T14(Sized, ExternalIndirection<NonExhaustive>);
-//~^ ERROR zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
-//~| WARN this was previously accepted by the compiler
-
-#[repr(transparent)]
-pub struct T15(Sized, ExternalIndirection<NonExhaustiveEnum>);
-//~^ ERROR zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
-//~| WARN this was previously accepted by the compiler
-
-#[repr(transparent)]
-pub struct T16(Sized, ExternalIndirection<NonExhaustiveVariant>);
-//~^ ERROR zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
-//~| WARN this was previously accepted by the compiler
-
-fn main() {}