about summary refs log tree commit diff
path: root/src/test/ui/parser/trait-object-trait-parens.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/parser/trait-object-trait-parens.rs')
-rw-r--r--src/test/ui/parser/trait-object-trait-parens.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/test/ui/parser/trait-object-trait-parens.rs b/src/test/ui/parser/trait-object-trait-parens.rs
index 9fbc938c4dc..7d55da7d097 100644
--- a/src/test/ui/parser/trait-object-trait-parens.rs
+++ b/src/test/ui/parser/trait-object-trait-parens.rs
@@ -9,12 +9,15 @@ fn main() {
     //~^ ERROR `?Trait` is not permitted in trait object types
     //~| ERROR only auto traits can be used as additional traits
     //~| WARN trait objects without an explicit `dyn` are deprecated
-    let _: Box<(?Sized) + (for<'a> Trait<'a>) + (Obj)>;
+    //~| WARN this was previously accepted by the compiler
+    let _: Box<?Sized + (for<'a> Trait<'a>) + (Obj)>;
     //~^ ERROR `?Trait` is not permitted in trait object types
     //~| ERROR only auto traits can be used as additional traits
     //~| WARN trait objects without an explicit `dyn` are deprecated
-    let _: Box<(for<'a> Trait<'a>) + (Obj) + (?Sized)>;
+    //~| WARN this was previously accepted by the compiler
+    let _: Box<for<'a> Trait<'a> + (Obj) + (?Sized)>;
     //~^ ERROR `?Trait` is not permitted in trait object types
     //~| ERROR only auto traits can be used as additional traits
     //~| WARN trait objects without an explicit `dyn` are deprecated
+    //~| WARN this was previously accepted by the compiler
 }