Skip to content

Commit b058489

Browse files
committed
fixed tidy
1 parent 9e15f56 commit b058489

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

compiler/rustc_parse/messages.ftl

+2-2
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,6 @@ parse_expected_expression_found_let = expected expression, found `let` statement
209209
.not_supported_or = `||` operators are not supported in let chain expressions
210210
.not_supported_parentheses = `let`s wrapped in parentheses are not supported in a context with let chains
211211
212-
parse_or_in_let_chain = `||` operators are not supported in let chain conditions
213-
214212
parse_expected_fn_path_found_fn_keyword = expected identifier, found keyword `fn`
215213
.suggestion = use `Fn` to refer to the trait
216214
@@ -677,6 +675,8 @@ parse_note_pattern_alternatives_use_single_vert = alternatives in or-patterns ar
677675
678676
parse_nul_in_c_str = null characters in C string literals are not supported
679677
678+
parse_or_in_let_chain = `||` operators are not supported in let chain conditions
679+
680680
parse_or_pattern_not_allowed_in_fn_parameters = top-level or-patterns are not allowed in function parameters
681681
parse_or_pattern_not_allowed_in_let_binding = top-level or-patterns are not allowed in `let` bindings
682682
parse_out_of_range_hex_escape = out of range hex escape

tests/ui/parser/or-in-let-chain.rs

-3
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,12 @@
55
fn main() {
66
if let true = true || false {}
77
//~^ ERROR `||` operators are not supported in let chain conditions
8-
98
// With parentheses
109
if (let true = true) || false {}
1110
//~^ ERROR expected expression, found `let` statement
12-
1311
// Multiple || operators
1412
if let true = true || false || true {}
1513
//~^ ERROR `||` operators are not supported in let chain conditions
16-
1714
// Mixed operators (should still show error for ||)
1815
if let true = true && false || true {}
1916
//~^ ERROR `||` operators are not supported in let chain conditions

0 commit comments

Comments
 (0)