]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/trait-object-bad-parens.rs
Rollup merge of #57667 - ishitatsuyuki:p-leak, r=nnethercote
[rust.git] / src / test / ui / parser / trait-object-bad-parens.rs
1 // compile-flags: -Z continue-parse-after-error
2
3 #![feature(optin_builtin_traits)]
4
5 auto trait Auto {}
6
7 fn main() {
8     let _: Box<((Auto)) + Auto>;
9     //~^ ERROR expected a path on the left-hand side of `+`, not `((Auto))`
10     let _: Box<(Auto + Auto) + Auto>;
11     //~^ ERROR expected a path on the left-hand side of `+`, not `(Auto + Auto)`
12     let _: Box<(Auto +) + Auto>;
13     //~^ ERROR expected a path on the left-hand side of `+`, not `(Auto)`
14     let _: Box<(dyn Auto) + Auto>;
15     //~^ ERROR expected a path on the left-hand side of `+`, not `(dyn Auto)`
16 }