This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #![recursion_limit = "8192"] | |
| use std::marker::PhantomData; | |
| macro_rules! declare_struct { | |
| ($decl:ident, $inner:ident) => { | |
| #[repr(transparent)] | |
| pub struct $decl($inner); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #![recursion_limit = "65572"] | |
| #[repr(transparent)] | |
| pub struct Alternator0<T>(pub Alternator1<T>); | |
| #[repr(transparent)] | |
| pub struct Alternator1<T>(pub AlternatorE<T>); | |
| #[repr(transparent)] | |
| pub struct AlternatorE<T>(pub T); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Check that encoding self-referential types works with #[repr(transparent)] | |
| //@ needs-sanitizer-cfi | |
| // FIXME(#122848) Remove only-linux once OSX CFI binaries work | |
| //@ only-linux | |
| //@ compile-flags: --crate-type=bin -Cprefer-dynamic=off -Clto -Zsanitizer=cfi | |
| //@ compile-flags: -C target-feature=-crt-static -C codegen-units=1 -C opt-level=0 | |
| //@ run-pass | |
| struct X<T> { |
OlderNewer