summaryrefslogtreecommitdiffstats
path: root/tests/ui/deriving/auxiliary/derive-no-std.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/deriving/auxiliary/derive-no-std.rs')
-rw-r--r--tests/ui/deriving/auxiliary/derive-no-std.rs29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/ui/deriving/auxiliary/derive-no-std.rs b/tests/ui/deriving/auxiliary/derive-no-std.rs
new file mode 100644
index 000000000..3893dc1be
--- /dev/null
+++ b/tests/ui/deriving/auxiliary/derive-no-std.rs
@@ -0,0 +1,29 @@
+// no-prefer-dynamic
+
+#![crate_type = "rlib"]
+#![no_std]
+
+// Issue #16803
+
+#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord,
+ Debug, Default, Copy)]
+pub struct Foo {
+ pub x: u32,
+}
+
+#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord,
+ Debug, Copy)]
+pub enum Bar {
+ Qux,
+ Quux(u32),
+}
+
+#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord,
+ Debug, Copy)]
+pub enum Void {}
+#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord,
+ Debug, Copy)]
+pub struct Empty;
+#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord,
+ Debug, Copy)]
+pub struct AlsoEmpty {}