diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-10-17 18:18:59 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-17 18:18:59 +0200 |
| commit | e0e2b3cc434cc86f3aa36dd8e99e84d3416b88d8 (patch) | |
| tree | d5da247b03326144c5c3e22a8f6bc43c35bf0aec /src/test | |
| parent | 0f1ba8d8c786f625934908d7681f9779e21668b5 (diff) | |
| parent | 3c1d55422a695204b70cbd23da582e3ab770a53c (diff) | |
| download | rust-e0e2b3cc434cc86f3aa36dd8e99e84d3416b88d8.tar.gz rust-e0e2b3cc434cc86f3aa36dd8e99e84d3416b88d8.zip | |
Rollup merge of #89963 - r00ster91:parenthesisparentheses, r=nagisa
Some "parenthesis" and "parentheses" fixes "Parenthesis" is the singular (e.g. one `(` or one `)`) and "parentheses" is the plural (multiple `(` or `)`s) and this is not hard to mix up so here are some fixes for that. Inspired by #89958
Diffstat (limited to 'src/test')
11 files changed, 73 insertions, 73 deletions
diff --git a/src/test/ui/empty/empty-struct-unit-expr.stderr b/src/test/ui/empty/empty-struct-unit-expr.stderr index 1023950639a..26bfc4355fa 100644 --- a/src/test/ui/empty/empty-struct-unit-expr.stderr +++ b/src/test/ui/empty/empty-struct-unit-expr.stderr @@ -20,7 +20,7 @@ LL | let e4 = E::Empty4(); | | | call expression requires function | -help: `E::Empty4` is a unit variant, you need to write it without the parenthesis +help: `E::Empty4` is a unit variant, you need to write it without the parentheses | LL | let e4 = E::Empty4; | ~~~~~~~~~ @@ -41,7 +41,7 @@ LL | let xe4 = XE::XEmpty4(); | | | call expression requires function | -help: `XE::XEmpty4` is a unit variant, you need to write it without the parenthesis +help: `XE::XEmpty4` is a unit variant, you need to write it without the parentheses | LL | let xe4 = XE::XEmpty4; | ~~~~~~~~~~~ diff --git a/src/test/ui/error-codes/E0618.stderr b/src/test/ui/error-codes/E0618.stderr index 19a1a8e20cc..db1b3f09837 100644 --- a/src/test/ui/error-codes/E0618.stderr +++ b/src/test/ui/error-codes/E0618.stderr @@ -9,7 +9,7 @@ LL | X::Entry(); | | | call expression requires function | -help: `X::Entry` is a unit variant, you need to write it without the parenthesis +help: `X::Entry` is a unit variant, you need to write it without the parentheses | LL | X::Entry; | ~~~~~~~~ diff --git a/src/test/ui/let-else/let-else-bool-binop-init.stderr b/src/test/ui/let-else/let-else-bool-binop-init.stderr index 6551e24cc83..edee6576244 100644 --- a/src/test/ui/let-else/let-else-bool-binop-init.stderr +++ b/src/test/ui/let-else/let-else-bool-binop-init.stderr @@ -4,7 +4,7 @@ error: a `&&` expression cannot be directly assigned in `let...else` LL | let true = true && false else { return }; | ^^^^^^^^^^^^^ | -help: wrap the expression in parenthesis +help: wrap the expression in parentheses | LL | let true = (true && false) else { return }; | + + @@ -15,7 +15,7 @@ error: a `||` expression cannot be directly assigned in `let...else` LL | let true = true || false else { return }; | ^^^^^^^^^^^^^ | -help: wrap the expression in parenthesis +help: wrap the expression in parentheses | LL | let true = (true || false) else { return }; | + + diff --git a/src/test/ui/let-else/let-else-brace-before-else.stderr b/src/test/ui/let-else/let-else-brace-before-else.stderr index eac029c848b..51051bbd4d8 100644 --- a/src/test/ui/let-else/let-else-brace-before-else.stderr +++ b/src/test/ui/let-else/let-else-brace-before-else.stderr @@ -4,7 +4,7 @@ error: right curly brace `}` before `else` in a `let...else` statement not allow LL | let Some(1) = { Some(1) } else { | ^ | -help: try wrapping the expression in parenthesis +help: try wrapping the expression in parentheses | LL | let Some(1) = ({ Some(1) }) else { | + + @@ -15,7 +15,7 @@ error: right curly brace `}` before `else` in a `let...else` statement not allow LL | let Some(1) = loop { break Some(1) } else { | ^ | -help: try wrapping the expression in parenthesis +help: try wrapping the expression in parentheses | LL | let Some(1) = (loop { break Some(1) }) else { | + + @@ -26,7 +26,7 @@ error: right curly brace `}` before `else` in a `let...else` statement not allow LL | let 2 = 1 + match 1 { n => n } else { | ^ | -help: try wrapping the expression in parenthesis +help: try wrapping the expression in parentheses | LL | let 2 = 1 + (match 1 { n => n }) else { | + + @@ -37,7 +37,7 @@ error: right curly brace `}` before `else` in a `let...else` statement not allow LL | let Some(1) = unsafe { unsafe_fn() } else { | ^ | -help: try wrapping the expression in parenthesis +help: try wrapping the expression in parentheses | LL | let Some(1) = (unsafe { unsafe_fn() }) else { | + + diff --git a/src/test/ui/parser/recover-for-loop-parens-around-head.rs b/src/test/ui/parser/recover-for-loop-parens-around-head.rs index 8080dbc332a..053b428bd12 100644 --- a/src/test/ui/parser/recover-for-loop-parens-around-head.rs +++ b/src/test/ui/parser/recover-for-loop-parens-around-head.rs @@ -9,7 +9,7 @@ fn main() { for ( elem in vec ) { //~^ ERROR expected one of `)`, `,`, `@`, or `|`, found keyword `in` - //~| ERROR unexpected parenthesis surrounding `for` loop head + //~| ERROR unexpected parentheses surrounding `for` loop head const RECOVERY_WITNESS: () = 0; //~ ERROR mismatched types } } diff --git a/src/test/ui/parser/recover-for-loop-parens-around-head.stderr b/src/test/ui/parser/recover-for-loop-parens-around-head.stderr index 21991348327..fa55970dbd1 100644 --- a/src/test/ui/parser/recover-for-loop-parens-around-head.stderr +++ b/src/test/ui/parser/recover-for-loop-parens-around-head.stderr @@ -4,13 +4,13 @@ error: expected one of `)`, `,`, `@`, or `|`, found keyword `in` LL | for ( elem in vec ) { | ^^ expected one of `)`, `,`, `@`, or `|` -error: unexpected parenthesis surrounding `for` loop head +error: unexpected parentheses surrounding `for` loop head --> $DIR/recover-for-loop-parens-around-head.rs:10:9 | LL | for ( elem in vec ) { | ^ ^ | -help: remove parenthesis in `for` loop +help: remove parentheses in `for` loop | LL - for ( elem in vec ) { LL + for elem in vec { diff --git a/src/test/ui/pattern/issue-67037-pat-tup-scrut-ty-diff-less-fields.rs b/src/test/ui/pattern/issue-67037-pat-tup-scrut-ty-diff-less-fields.rs index a3023ee906d..ae28c140375 100644 --- a/src/test/ui/pattern/issue-67037-pat-tup-scrut-ty-diff-less-fields.rs +++ b/src/test/ui/pattern/issue-67037-pat-tup-scrut-ty-diff-less-fields.rs @@ -5,7 +5,7 @@ // the tuple struct pattern, has 0 fields, but requires 1 field. // // In emitting E0023, we try to see if this is a case of e.g., `Some(a, b, c)` but where -// the scrutinee was of type `Some((a, b, c))`, and suggest that parenthesis be added. +// the scrutinee was of type `Some((a, b, c))`, and suggest that parentheses be added. // // However, we did not account for the expected type being different than the tuple pattern type. // This caused an issue when the tuple pattern type (`P<T>`) was generic. diff --git a/src/test/ui/resolve/privacy-enum-ctor.stderr b/src/test/ui/resolve/privacy-enum-ctor.stderr index ff72b0b563a..06c52befd52 100644 --- a/src/test/ui/resolve/privacy-enum-ctor.stderr +++ b/src/test/ui/resolve/privacy-enum-ctor.stderr @@ -338,7 +338,7 @@ LL | let _ = Z::Unit(); | | | call expression requires function | -help: `Z::Unit` is a unit variant, you need to write it without the parenthesis +help: `Z::Unit` is a unit variant, you need to write it without the parentheses | LL | let _ = Z::Unit; | ~~~~~~~ @@ -372,7 +372,7 @@ LL | let _: E = m::E::Unit(); | | | call expression requires function | -help: `m::E::Unit` is a unit variant, you need to write it without the parenthesis +help: `m::E::Unit` is a unit variant, you need to write it without the parentheses | LL | let _: E = m::E::Unit; | ~~~~~~~~~~ @@ -406,7 +406,7 @@ LL | let _: E = E::Unit(); | | | call expression requires function | -help: `E::Unit` is a unit variant, you need to write it without the parenthesis +help: `E::Unit` is a unit variant, you need to write it without the parentheses | LL | let _: E = E::Unit; | ~~~~~~~ diff --git a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr index 5ec4352919e..513b473c4de 100644 --- a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr +++ b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr @@ -16,7 +16,7 @@ LL | if &let 0 = 0 {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:33:9 @@ -25,7 +25,7 @@ LL | if !let 0 = 0 {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:34:9 @@ -34,7 +34,7 @@ LL | if *let 0 = 0 {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:36:9 @@ -43,7 +43,7 @@ LL | if -let 0 = 0 {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:44:9 @@ -52,7 +52,7 @@ LL | if (let 0 = 0)? {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:48:16 @@ -61,7 +61,7 @@ LL | if true || let 0 = 0 {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:49:17 @@ -70,7 +70,7 @@ LL | if (true || let 0 = 0) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:50:25 @@ -79,7 +79,7 @@ LL | if true && (true || let 0 = 0) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:51:25 @@ -88,7 +88,7 @@ LL | if true || (true && let 0 = 0) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:54:12 @@ -97,7 +97,7 @@ LL | if x = let 0 = 0 {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:57:15 @@ -106,7 +106,7 @@ LL | if true..(let 0 = 0) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:59:11 @@ -115,7 +115,7 @@ LL | if ..(let 0 = 0) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:61:9 @@ -124,7 +124,7 @@ LL | if (let 0 = 0).. {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:65:8 @@ -133,7 +133,7 @@ LL | if let Range { start: _, end: _ } = true..true && false {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:69:8 @@ -142,7 +142,7 @@ LL | if let Range { start: _, end: _ } = true..true || false {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:76:8 @@ -151,7 +151,7 @@ LL | if let Range { start: F, end } = F..|| true {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:84:8 @@ -160,7 +160,7 @@ LL | if let Range { start: true, end } = t..&&false {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:90:19 @@ -169,7 +169,7 @@ LL | if let true = let true = true {} | ^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:94:12 @@ -178,7 +178,7 @@ LL | while &let 0 = 0 {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:97:12 @@ -187,7 +187,7 @@ LL | while !let 0 = 0 {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:98:12 @@ -196,7 +196,7 @@ LL | while *let 0 = 0 {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:100:12 @@ -205,7 +205,7 @@ LL | while -let 0 = 0 {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:108:12 @@ -214,7 +214,7 @@ LL | while (let 0 = 0)? {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:112:19 @@ -223,7 +223,7 @@ LL | while true || let 0 = 0 {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:113:20 @@ -232,7 +232,7 @@ LL | while (true || let 0 = 0) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:114:28 @@ -241,7 +241,7 @@ LL | while true && (true || let 0 = 0) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:115:28 @@ -250,7 +250,7 @@ LL | while true || (true && let 0 = 0) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:118:15 @@ -259,7 +259,7 @@ LL | while x = let 0 = 0 {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:121:18 @@ -268,7 +268,7 @@ LL | while true..(let 0 = 0) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:123:14 @@ -277,7 +277,7 @@ LL | while ..(let 0 = 0) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:125:12 @@ -286,7 +286,7 @@ LL | while (let 0 = 0).. {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:129:11 @@ -295,7 +295,7 @@ LL | while let Range { start: _, end: _ } = true..true && false {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:133:11 @@ -304,7 +304,7 @@ LL | while let Range { start: _, end: _ } = true..true || false {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:140:11 @@ -313,7 +313,7 @@ LL | while let Range { start: F, end } = F..|| true {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:148:11 @@ -322,7 +322,7 @@ LL | while let Range { start: true, end } = t..&&false {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:154:22 @@ -331,7 +331,7 @@ LL | while let true = let true = true {} | ^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:168:6 @@ -340,7 +340,7 @@ LL | &let 0 = 0; | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:170:6 @@ -349,7 +349,7 @@ LL | !let 0 = 0; | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:171:6 @@ -358,7 +358,7 @@ LL | *let 0 = 0; | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:173:6 @@ -367,7 +367,7 @@ LL | -let 0 = 0; | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:181:6 @@ -376,7 +376,7 @@ LL | (let 0 = 0)?; | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:185:13 @@ -385,7 +385,7 @@ LL | true || let 0 = 0; | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:186:14 @@ -394,7 +394,7 @@ LL | (true || let 0 = 0); | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:187:22 @@ -403,7 +403,7 @@ LL | true && (true || let 0 = 0); | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:190:9 @@ -412,7 +412,7 @@ LL | x = let 0 = 0; | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:192:12 @@ -421,7 +421,7 @@ LL | true..(let 0 = 0); | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:193:8 @@ -430,7 +430,7 @@ LL | ..(let 0 = 0); | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:194:6 @@ -439,7 +439,7 @@ LL | (let 0 = 0)..; | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:196:6 @@ -448,7 +448,7 @@ LL | (let Range { start: _, end: _ } = true..true || false); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:200:6 @@ -457,7 +457,7 @@ LL | (let true = let true = true); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:204:6 @@ -466,7 +466,7 @@ LL | &let 0 = 0 | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:215:17 @@ -475,7 +475,7 @@ LL | true && let 1 = 1 | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:219:17 @@ -484,7 +484,7 @@ LL | true && let 1 = 1 | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:223:17 @@ -493,7 +493,7 @@ LL | true && let 1 = 1 | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:233:17 @@ -502,7 +502,7 @@ LL | true && let 1 = 1 | ^^^^^^^^^ | = note: only supported directly in conditions of `if`- and `while`-expressions - = note: as well as when nested within `&&` and parenthesis in those conditions + = note: as well as when nested within `&&` and parentheses in those conditions warning: the feature `let_chains` is incomplete and may not be safe to use and/or cause compiler crashes --> $DIR/disallowed-positions.rs:20:12 diff --git a/src/test/ui/suggestions/suggest-on-bare-closure-call.stderr b/src/test/ui/suggestions/suggest-on-bare-closure-call.stderr index 0c91e2feed3..81f2e498fe5 100644 --- a/src/test/ui/suggestions/suggest-on-bare-closure-call.stderr +++ b/src/test/ui/suggestions/suggest-on-bare-closure-call.stderr @@ -6,7 +6,7 @@ LL | let _ = ||{}(); | | | call expression requires function | -help: if you meant to create this closure and immediately call it, surround the closure with parenthesis +help: if you meant to create this closure and immediately call it, surround the closure with parentheses | LL | let _ = (||{})(); | + + diff --git a/src/test/ui/type-alias-enum-variants/incorrect-variant-form-through-alias-caught.stderr b/src/test/ui/type-alias-enum-variants/incorrect-variant-form-through-alias-caught.stderr index 2e12b768f70..e918551020c 100644 --- a/src/test/ui/type-alias-enum-variants/incorrect-variant-form-through-alias-caught.stderr +++ b/src/test/ui/type-alias-enum-variants/incorrect-variant-form-through-alias-caught.stderr @@ -27,7 +27,7 @@ LL | Alias::Unit(); | | | call expression requires function | -help: `Alias::Unit` is a unit variant, you need to write it without the parenthesis +help: `Alias::Unit` is a unit variant, you need to write it without the parentheses | LL | Alias::Unit; | ~~~~~~~~~~~ |
