summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/let_with_type_underscore.stderr
diff options
context:
space:
mode:
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
+