summaryrefslogtreecommitdiffstats
path: root/src/test/ui/maybe-bounds.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/maybe-bounds.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/maybe-bounds.rs b/src/test/ui/maybe-bounds.rs
new file mode 100644
index 000000000..02ed45c65
--- /dev/null
+++ b/src/test/ui/maybe-bounds.rs
@@ -0,0 +1,9 @@
+trait Tr: ?Sized {}
+//~^ ERROR `?Trait` is not permitted in supertraits
+
+type A1 = dyn Tr + (?Sized);
+//~^ ERROR `?Trait` is not permitted in trait object types
+type A2 = dyn for<'a> Tr + (?Sized);
+//~^ ERROR `?Trait` is not permitted in trait object types
+
+fn main() {}