summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/promoted-validation-55454.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/consts/promoted-validation-55454.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/consts/promoted-validation-55454.rs b/src/test/ui/consts/promoted-validation-55454.rs
new file mode 100644
index 000000000..23cae4fb5
--- /dev/null
+++ b/src/test/ui/consts/promoted-validation-55454.rs
@@ -0,0 +1,9 @@
+// https://github.com/rust-lang/rust/issues/55454
+// build-pass (FIXME(62277): could be check-pass?)
+
+#[derive(PartialEq)]
+struct This<T>(T);
+
+fn main() {
+ This(Some(&1)) == This(Some(&1));
+}