]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/trait-object-lifetime-parens.rs
Add 'compiler/rustc_codegen_cranelift/' from commit '793d26047f994e23415f8f6bb5686ff2...
[rust.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     // FIXME: It'd be great if we could add suggestion to the following case.
10     let _: Box<('a) + Trait>; //~ ERROR lifetime in trait object type must be followed by `+`
11 }
12
13 fn main() {}