summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/let_with_type_underscore.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
commit1376c5a617be5c25655d0d7cb63e3beaa5a6e026 (patch)
tree3bb8d61aee02bc7a15eab3f36e3b921afc2075d0 /src/tools/clippy/tests/ui/let_with_type_underscore.stderr
parentReleasing progress-linux version 1.69.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.tar.xz
rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.zip
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/clippy/tests/ui/let_with_type_underscore.stderr')
-rw-r--r--src/tools/clippy/tests/ui/let_with_type_underscore.stderr39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/let_with_type_underscore.stderr b/src/tools/clippy/tests/ui/let_with_type_underscore.stderr
new file mode 100644
index 000000000..16bf83c70
--- /dev/null
+++ b/src/tools/clippy/tests/ui/let_with_type_underscore.stderr
@@ -0,0 +1,39 @@
+error: variable declared with type underscore
+ --> $DIR/let_with_type_underscore.rs:11:5
+ |
+LL | let x: _ = 1;
+ | ^^^^^^^^^^^^^
+ |
+help: remove the explicit type `_` declaration
+ --> $DIR/let_with_type_underscore.rs:11:10
+ |
+LL | let x: _ = 1;
+ | ^^^
+ = note: `-D clippy::let-with-type-underscore` implied by `-D warnings`
+
+error: variable declared with type underscore
+ --> $DIR/let_with_type_underscore.rs:12:5
+ |
+LL | let _: _ = 2;
+ | ^^^^^^^^^^^^^
+ |
+help: remove the explicit type `_` declaration
+ --> $DIR/let_with_type_underscore.rs:12:10
+ |
+LL | let _: _ = 2;
+ | ^^^
+
+error: variable declared with type underscore
+ --> $DIR/let_with_type_underscore.rs:13:5
+ |
+LL | let x: _ = func();
+ | ^^^^^^^^^^^^^^^^^^
+ |
+help: remove the explicit type `_` declaration
+ --> $DIR/let_with_type_underscore.rs:13:10
+ |
+LL | let x: _ = func();
+ | ^^^
+
+error: aborting due to 3 previous errors
+