1 error: Rust has no ternary operator
2 --> $DIR/ternary_operator.rs:2:19
4 LL | let x = 5 > 2 ? true : false;
7 = help: use an `if-else` expression instead
9 error: Rust has no ternary operator
10 --> $DIR/ternary_operator.rs:8:19
12 LL | let x = 5 > 2 ? { true } : { false };
13 | ^^^^^^^^^^^^^^^^^^^^^^^
15 = help: use an `if-else` expression instead
17 error: Rust has no ternary operator
18 --> $DIR/ternary_operator.rs:14:19
20 LL | let x = 5 > 2 ? f32::MAX : f32::MIN;
21 | ^^^^^^^^^^^^^^^^^^^^^^
23 = help: use an `if-else` expression instead
25 error: expected one of `.`, `;`, `?`, `}`, or an operator, found keyword `return`
26 --> $DIR/ternary_operator.rs:21:9
29 | ^^^^^^ expected one of `.`, `;`, `?`, `}`, or an operator
31 error: expected one of `.`, `;`, `?`, `else`, or an operator, found `:`
32 --> $DIR/ternary_operator.rs:26:37
34 LL | let x = 5 > 2 ? { let x = vec![]: Vec<u16>; x } : { false };
35 | ^ expected one of `.`, `;`, `?`, `else`, or an operator
37 = note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
39 error: Rust has no ternary operator
40 --> $DIR/ternary_operator.rs:26:19
42 LL | let x = 5 > 2 ? { let x = vec![]: Vec<u16>; x } : { false };
43 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45 = help: use an `if-else` expression instead
47 error: aborting due to 6 previous errors