summaryrefslogtreecommitdiffstats
path: root/tests/ui/auto-traits/auto-trait-validation.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/auto-traits/auto-trait-validation.rs')
-rw-r--r--tests/ui/auto-traits/auto-trait-validation.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/auto-traits/auto-trait-validation.rs b/tests/ui/auto-traits/auto-trait-validation.rs
new file mode 100644
index 000000000..d43055e27
--- /dev/null
+++ b/tests/ui/auto-traits/auto-trait-validation.rs
@@ -0,0 +1,13 @@
+#![feature(auto_traits)]
+
+// run-rustfix
+
+auto trait Generic<T> {}
+//~^ auto traits cannot have generic parameters [E0567]
+auto trait Bound : Copy {}
+//~^ auto traits cannot have super traits or lifetime bounds [E0568]
+auto trait LifetimeBound : 'static {}
+//~^ auto traits cannot have super traits or lifetime bounds [E0568]
+auto trait MyTrait { fn foo() {} }
+//~^ auto traits cannot have associated items [E0380]
+fn main() {}