rust/src/test/ui/parser/trait-object-polytrait-priority.rs

9 lines
249 B
Rust
Raw Normal View History

2017-03-16 16:47:32 -05:00
trait Trait<'a> {}
fn main() {
let _: &for<'a> Trait<'a> + 'static;
//~^ ERROR expected a path on the left-hand side of `+`, not `&for<'a> Trait<'a>`
2017-03-16 16:47:32 -05:00
//~| HELP try adding parentheses
//~| SUGGESTION &(for<'a> Trait<'a> + 'static)
2017-03-16 16:47:32 -05:00
}