rust/tests/ui/parser/trait-object-polytrait-priority.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
280 B
Rust
Raw Normal View History

#![allow(bare_trait_objects)]
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
}