]> git.proxmox.com Git - rustc.git/blob - src/test/ui/parser/trait-object-lifetime-parens.rs
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / parser / trait-object-lifetime-parens.rs
1 #![allow(bare_trait_objects)]
2
3 trait Trait {}
4
5 fn f<'a, T: Trait + ('a)>() {} //~ ERROR parenthesized lifetime bounds are not supported
6
7 fn check<'a>() {
8 let _: Box<Trait + ('a)>; //~ ERROR parenthesized lifetime bounds are not supported
9 let _: Box<('a) + Trait>; //~ ERROR lifetime in trait object type must be followed by `+`
10 }
11
12 fn main() {}