summaryrefslogtreecommitdiffstats
path: root/src/test/ui-fulldeps/empty-struct-braces-derive.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:58 +0000
commita4b7ed7a42c716ab9f05e351f003d589124fd55d (patch)
treeb620cd3f223850b28716e474e80c58059dca5dd4 /src/test/ui-fulldeps/empty-struct-braces-derive.rs
parentAdding upstream version 1.67.1+dfsg1. (diff)
downloadrustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.tar.xz
rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.zip
Adding upstream version 1.68.2+dfsg1.upstream/1.68.2+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui-fulldeps/empty-struct-braces-derive.rs')
-rw-r--r--src/test/ui-fulldeps/empty-struct-braces-derive.rs56
1 files changed, 0 insertions, 56 deletions
diff --git a/src/test/ui-fulldeps/empty-struct-braces-derive.rs b/src/test/ui-fulldeps/empty-struct-braces-derive.rs
deleted file mode 100644
index 6e5eb5462..000000000
--- a/src/test/ui-fulldeps/empty-struct-braces-derive.rs
+++ /dev/null
@@ -1,56 +0,0 @@
-// run-pass
-// `#[derive(Trait)]` works for empty structs/variants with braces or parens.
-
-#![feature(rustc_private)]
-
-extern crate rustc_macros;
-extern crate rustc_serialize;
-
-use rustc_macros::{Decodable, Encodable};
-
-#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default, Debug, Encodable, Decodable)]
-struct S {}
-
-#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default, Debug, Encodable, Decodable)]
-struct Z();
-
-#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Encodable, Decodable)]
-enum E {
- V {},
- U,
- W(),
-}
-
-fn main() {
- let s = S {};
- let s1 = s;
- let s2 = s.clone();
- assert_eq!(s, s1);
- assert_eq!(s, s2);
- assert!(!(s < s1));
- assert_eq!(format!("{:?}", s), "S");
-
- let z = Z();
- let z1 = z;
- let z2 = z.clone();
- assert_eq!(z, z1);
- assert_eq!(z, z2);
- assert!(!(z < z1));
- assert_eq!(format!("{:?}", z), "Z");
-
- let e = E::V {};
- let e1 = e;
- let e2 = e.clone();
- assert_eq!(e, e1);
- assert_eq!(e, e2);
- assert!(!(e < e1));
- assert_eq!(format!("{:?}", e), "V");
-
- let e = E::W();
- let e1 = e;
- let e2 = e.clone();
- assert_eq!(e, e1);
- assert_eq!(e, e2);
- assert!(!(e < e1));
- assert_eq!(format!("{:?}", e), "W");
-}