summaryrefslogtreecommitdiffstats
path: root/tests/ui/try-block/try-block-unused-delims.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/ui/try-block/try-block-unused-delims.stderr
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/try-block/try-block-unused-delims.stderr')
-rw-r--r--tests/ui/try-block/try-block-unused-delims.stderr72
1 files changed, 72 insertions, 0 deletions
diff --git a/tests/ui/try-block/try-block-unused-delims.stderr b/tests/ui/try-block/try-block-unused-delims.stderr
new file mode 100644
index 000000000..765cd9c0f
--- /dev/null
+++ b/tests/ui/try-block/try-block-unused-delims.stderr
@@ -0,0 +1,72 @@
+warning: unnecessary parentheses around function argument
+ --> $DIR/try-block-unused-delims.rs:11:13
+ |
+LL | consume((try {}));
+ | ^ ^
+ |
+note: the lint level is defined here
+ --> $DIR/try-block-unused-delims.rs:6:9
+ |
+LL | #![warn(unused_parens, unused_braces)]
+ | ^^^^^^^^^^^^^
+help: remove these parentheses
+ |
+LL - consume((try {}));
+LL + consume(try {});
+ |
+
+warning: unnecessary braces around function argument
+ --> $DIR/try-block-unused-delims.rs:14:13
+ |
+LL | consume({ try {} });
+ | ^^ ^^
+ |
+note: the lint level is defined here
+ --> $DIR/try-block-unused-delims.rs:6:24
+ |
+LL | #![warn(unused_parens, unused_braces)]
+ | ^^^^^^^^^^^^^
+help: remove these braces
+ |
+LL - consume({ try {} });
+LL + consume(try {});
+ |
+
+warning: unnecessary parentheses around `match` scrutinee expression
+ --> $DIR/try-block-unused-delims.rs:17:11
+ |
+LL | match (try {}) {
+ | ^ ^
+ |
+help: remove these parentheses
+ |
+LL - match (try {}) {
+LL + match try {} {
+ |
+
+warning: unnecessary parentheses around `let` scrutinee expression
+ --> $DIR/try-block-unused-delims.rs:22:22
+ |
+LL | if let Err(()) = (try {}) {}
+ | ^ ^
+ |
+help: remove these parentheses
+ |
+LL - if let Err(()) = (try {}) {}
+LL + if let Err(()) = try {} {}
+ |
+
+warning: unnecessary parentheses around `match` scrutinee expression
+ --> $DIR/try-block-unused-delims.rs:25:11
+ |
+LL | match (try {}) {
+ | ^ ^
+ |
+help: remove these parentheses
+ |
+LL - match (try {}) {
+LL + match try {} {
+ |
+
+warning: 5 warnings emitted
+