rust/src/test/ui/parser/issue-88276-unary-plus.rs

14 lines
623 B
Rust
Raw Normal View History

2021-08-31 22:07:58 -05:00
// run-rustfix
#[allow(unused_parens)]
fn main() {
let _ = +1; //~ ERROR leading `+` is not supported
let _ = -+(1+2)*3; //~ ERROR leading `+` is not supported
let _ = -+-+(1+2)*3; //~ ERROR leading `+` is not supported
//~| ERROR leading `+` is not supported
let _ = (1 + +2) * +3; //~ ERROR leading `+` is not supported
//~| ERROR leading `+` is not supported
2021-08-31 22:07:58 -05:00
let _ = (+&"hello"); //~ ERROR leading `+` is not supported
let _ = +[+3, 4+6]; //~ ERROR leading `+` is not supported
//~| ERROR leading `+` is not supported
}