about summary refs log tree commit diff
path: root/src/test/ui/parser/trait-object-trait-parens.rs
diff options
context:
space:
mode:
authorRyan Levick <me@ryanlevick.com>2021-04-16 11:06:51 +0200
committerRyan Levick <me@ryanlevick.com>2021-04-16 11:06:51 +0200
commitcd8392dd9932c30f5e6e7b42a1f3ab9e90ab11f8 (patch)
tree592d7dbcc5d6eb1ca264d961a168780e65e108b2 /src/test/ui/parser/trait-object-trait-parens.rs
parent43f9d0ae7e0733b1e4e7ad84165ddd57144f2db7 (diff)
downloadrust-cd8392dd9932c30f5e6e7b42a1f3ab9e90ab11f8.tar.gz
rust-cd8392dd9932c30f5e6e7b42a1f3ab9e90ab11f8.zip
Fix tests
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
 }