2019-05-28 18:45:27 +00:00
|
|
|
#![allow(bare_trait_objects)]
|
|
|
|
|
2019-01-06 15:33:05 +00:00
|
|
|
trait Trait {}
|
2017-04-04 22:12:53 +00:00
|
|
|
|
2019-01-06 15:33:05 +00:00
|
|
|
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
|
2020-07-02 05:32:12 +00:00
|
|
|
// FIXME: It'd be great if we could add suggestion to the following case.
|
2020-03-07 12:52:55 +00:00
|
|
|
let _: Box<('a) + Trait>; //~ ERROR lifetime in trait object type must be followed by `+`
|
2017-04-04 22:12:53 +00:00
|
|
|
}
|
2019-01-06 15:33:05 +00:00
|
|
|
|
|
|
|
fn main() {}
|