about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/crashes/127222.rs3
-rw-r--r--tests/ui/traits/alias/not-a-marker.rs7
-rw-r--r--tests/ui/traits/alias/not-a-marker.stderr11
3 files changed, 18 insertions, 3 deletions
diff --git a/tests/crashes/127222.rs b/tests/crashes/127222.rs
deleted file mode 100644
index eda0ea3d9b7..00000000000
--- a/tests/crashes/127222.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-//@ known-bug: rust-lang/rust#127222
-#[marker]
-trait Foo = PartialEq<i32> + Send;
diff --git a/tests/ui/traits/alias/not-a-marker.rs b/tests/ui/traits/alias/not-a-marker.rs
new file mode 100644
index 00000000000..b004b9ff9ae
--- /dev/null
+++ b/tests/ui/traits/alias/not-a-marker.rs
@@ -0,0 +1,7 @@
+#![feature(trait_alias, marker_trait_attr)]
+
+#[marker]
+//~^ ERROR attribute should be applied to a trait
+trait Foo = Send;
+
+fn main() {}
diff --git a/tests/ui/traits/alias/not-a-marker.stderr b/tests/ui/traits/alias/not-a-marker.stderr
new file mode 100644
index 00000000000..2f3f6fea30f
--- /dev/null
+++ b/tests/ui/traits/alias/not-a-marker.stderr
@@ -0,0 +1,11 @@
+error: attribute should be applied to a trait
+  --> $DIR/not-a-marker.rs:3:1
+   |
+LL | #[marker]
+   | ^^^^^^^^^
+LL |
+LL | trait Foo = Send;
+   | ----------------- not a trait
+
+error: aborting due to 1 previous error
+