summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/ignore-nested-field-binding.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/suggestions/ignore-nested-field-binding.stderr')
-rw-r--r--tests/ui/suggestions/ignore-nested-field-binding.stderr20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/ui/suggestions/ignore-nested-field-binding.stderr b/tests/ui/suggestions/ignore-nested-field-binding.stderr
new file mode 100644
index 000000000..b2936a22a
--- /dev/null
+++ b/tests/ui/suggestions/ignore-nested-field-binding.stderr
@@ -0,0 +1,20 @@
+error: unused variable: `i`
+ --> $DIR/ignore-nested-field-binding.rs:11:27
+ |
+LL | fn foo(Outer { o: Inner { i } }: Outer) {}
+ | ^ help: try ignoring the field: `i: _`
+ |
+note: the lint level is defined here
+ --> $DIR/ignore-nested-field-binding.rs:6:11
+ |
+LL | #![forbid(unused_variables)]
+ | ^^^^^^^^^^^^^^^^
+
+error: unused variable: `i`
+ --> $DIR/ignore-nested-field-binding.rs:17:28
+ |
+LL | let Outer { o: Inner { i } } = s;
+ | ^ help: try ignoring the field: `i: _`
+
+error: aborting due to 2 previous errors
+