about summary refs log tree commit diff
path: root/src/test/ui/parser/trait-object-lifetime-parens.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/parser/trait-object-lifetime-parens.rs')
-rw-r--r--src/test/ui/parser/trait-object-lifetime-parens.rs14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/test/ui/parser/trait-object-lifetime-parens.rs b/src/test/ui/parser/trait-object-lifetime-parens.rs
index fef8352e93b..b188e14778b 100644
--- a/src/test/ui/parser/trait-object-lifetime-parens.rs
+++ b/src/test/ui/parser/trait-object-lifetime-parens.rs
@@ -1,8 +1,12 @@
-// compile-flags: -Z parse-only -Z continue-parse-after-error
+// compile-flags: -Z continue-parse-after-error
 
-fn f<T: Copy + ('a)>() {} //~ ERROR parenthesized lifetime bounds are not supported
+trait Trait {}
 
-fn main() {
-    let _: Box<Copy + ('a)>; //~ ERROR parenthesized lifetime bounds are not supported
-    let _: Box<('a) + Copy>; //~ ERROR expected type, found `'a`
+fn f<'a, T: Trait + ('a)>() {} //~ ERROR parenthesized lifetime bounds are not supported
+
+fn check<'a>() {
+    let _: Box<Trait + ('a)>; //~ ERROR parenthesized lifetime bounds are not supported
+    let _: Box<('a) + Trait>; //~ ERROR expected type, found `'a`
 }
+
+fn main() {}