From 96d23305473e71bc6fdfca0fca4d6a22983801be Mon Sep 17 00:00:00 2001 From: John Hodge Date: Fri, 19 Oct 2018 17:19:29 +0800 Subject: Add a few new tests, one for #86, the other for #77 (eventually) --- samples/test/issue-mrustc-77.rs | 14 ++++++++++++++ samples/test/zst_use.rs | 12 ++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 samples/test/issue-mrustc-77.rs create mode 100644 samples/test/zst_use.rs (limited to 'samples/test') diff --git a/samples/test/issue-mrustc-77.rs b/samples/test/issue-mrustc-77.rs new file mode 100644 index 00000000..ba916822 --- /dev/null +++ b/samples/test/issue-mrustc-77.rs @@ -0,0 +1,14 @@ +// ignore-test + +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + storage: Storage, + align: [Align; 0], +} + +fn main() { +} diff --git a/samples/test/zst_use.rs b/samples/test/zst_use.rs new file mode 100644 index 00000000..17e75919 --- /dev/null +++ b/samples/test/zst_use.rs @@ -0,0 +1,12 @@ +// compile-flags: --test + +#[test] +fn zst_enum_variant() { + #[inline(never)] + fn takes_fn Option<()>>(f: F) { + f( () ); + } + + takes_fn( Option::Some ); +} + -- cgit v1.2.3