diff options
| author | yukang <moorekang@gmail.com> | 2023-06-06 23:56:46 +0800 |
|---|---|---|
| committer | yukang <moorekang@gmail.com> | 2023-06-10 06:28:35 +0800 |
| commit | e3071eaa608301bd4106c304e3c2f433d6507500 (patch) | |
| tree | 6e092f3f1122713954c43d5939ff06a7377742c9 /tests/ui/parser | |
| parent | 3983881d4e00c2b12d1b5b0319b4c61d72926917 (diff) | |
| download | rust-e3071eaa608301bd4106c304e3c2f433d6507500.tar.gz rust-e3071eaa608301bd4106c304e3c2f433d6507500.zip | |
reword the message to suggest surrounding with parentheses
Diffstat (limited to 'tests/ui/parser')
| -rw-r--r-- | tests/ui/parser/issues/issue-111692.stderr | 8 | ||||
| -rw-r--r-- | tests/ui/parser/method-call-on-struct-literal-in-if-condition.stderr | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/ui/parser/issues/issue-111692.stderr b/tests/ui/parser/issues/issue-111692.stderr index 7b09d47301d..068b0483b0f 100644 --- a/tests/ui/parser/issues/issue-111692.stderr +++ b/tests/ui/parser/issues/issue-111692.stderr @@ -4,7 +4,7 @@ error: invalid struct literal LL | if x == module::Type { x: module::C, y: 1 } { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -help: you might need to surround the struct literal in parentheses +help: you might need to surround the struct literal with parentheses | LL | if x == (module::Type { x: module::C, y: 1 }) { | + + @@ -15,7 +15,7 @@ error: invalid struct literal LL | if x ==module::Type { x: module::C, y: 1 } { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -help: you might need to surround the struct literal in parentheses +help: you might need to surround the struct literal with parentheses | LL | if x ==(module::Type { x: module::C, y: 1 }) { | + + @@ -26,7 +26,7 @@ error: invalid struct literal LL | if x == Type { x: module::C, y: 1 } { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -help: you might need to surround the struct literal in parentheses +help: you might need to surround the struct literal with parentheses | LL | if x == (Type { x: module::C, y: 1 }) { | + + @@ -37,7 +37,7 @@ error: invalid struct literal LL | if x == demo_module::Type { x: module::C, y: 1 } { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -help: you might need to surround the struct literal in parentheses +help: you might need to surround the struct literal with parentheses | LL | if x == (demo_module::Type { x: module::C, y: 1 }) { | + + diff --git a/tests/ui/parser/method-call-on-struct-literal-in-if-condition.stderr b/tests/ui/parser/method-call-on-struct-literal-in-if-condition.stderr index 7fd7ffc94a5..dedbad90945 100644 --- a/tests/ui/parser/method-call-on-struct-literal-in-if-condition.stderr +++ b/tests/ui/parser/method-call-on-struct-literal-in-if-condition.stderr @@ -4,7 +4,7 @@ error: invalid struct literal LL | if Example { a: one(), }.is_pos() { | ^^^^^^^^^^^^^^^^^^^^^ | -help: you might need to surround the struct literal in parentheses +help: you might need to surround the struct literal with parentheses | LL | if (Example { a: one(), }).is_pos() { | + + |
