summaryrefslogtreecommitdiffstats
path: root/src/test/ui/drop-bounds/drop-bounds.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/drop-bounds/drop-bounds.rs')
-rw-r--r--src/test/ui/drop-bounds/drop-bounds.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/ui/drop-bounds/drop-bounds.rs b/src/test/ui/drop-bounds/drop-bounds.rs
new file mode 100644
index 000000000..c73538278
--- /dev/null
+++ b/src/test/ui/drop-bounds/drop-bounds.rs
@@ -0,0 +1,19 @@
+#![deny(drop_bounds)]
+fn foo<T: Drop>() {} //~ ERROR
+fn bar<U>()
+where
+ U: Drop, //~ ERROR
+{
+}
+fn baz(_x: impl Drop) {} //~ ERROR
+struct Foo<T: Drop> { //~ ERROR
+ _x: T
+}
+struct Bar<U> where U: Drop { //~ ERROR
+ _x: U
+}
+trait Baz: Drop { //~ ERROR
+}
+impl<T: Drop> Baz for T { //~ ERROR
+}
+fn main() {}