diff options
author | John Hodge <tpg@ucc.asn.au> | 2018-10-19 17:19:29 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2018-10-19 17:19:29 +0800 |
commit | 96d23305473e71bc6fdfca0fca4d6a22983801be (patch) | |
tree | de221ea89540a4aaae86cac56bc322a4a6180b5f /samples/test | |
parent | f5168113b6dcdfc8e9713dcf122b99ca6e26a4fc (diff) | |
download | mrust-96d23305473e71bc6fdfca0fca4d6a22983801be.tar.gz |
Add a few new tests, one for #86, the other for #77 (eventually)
Diffstat (limited to 'samples/test')
-rw-r--r-- | samples/test/issue-mrustc-77.rs | 14 | ||||
-rw-r--r-- | samples/test/zst_use.rs | 12 |
2 files changed, 26 insertions, 0 deletions
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<Storage, Align> +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<F: Fn( () ) -> Option<()>>(f: F) { + f( () ); + } + + takes_fn( Option::Some ); +} + |