summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/unused/unused_attributes-must_use.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/lint/unused/unused_attributes-must_use.stderr')
-rw-r--r--src/test/ui/lint/unused/unused_attributes-must_use.stderr14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/test/ui/lint/unused/unused_attributes-must_use.stderr b/src/test/ui/lint/unused/unused_attributes-must_use.stderr
index 317d81c59..dd112c23e 100644
--- a/src/test/ui/lint/unused/unused_attributes-must_use.stderr
+++ b/src/test/ui/lint/unused/unused_attributes-must_use.stderr
@@ -105,6 +105,18 @@ error: `#[must_use]` has no effect when applied to an match arm
LL | #[must_use]
| ^^^^^^^^^^^
+error: `#[must_use]` has no effect when applied to a struct field
+ --> $DIR/unused_attributes-must_use.rs:129:28
+ |
+LL | let s = PatternField { #[must_use] foo: 123 };
+ | ^^^^^^^^^^^
+
+error: `#[must_use]` has no effect when applied to a pattern field
+ --> $DIR/unused_attributes-must_use.rs:130:24
+ |
+LL | let PatternField { #[must_use] foo } = s;
+ | ^^^^^^^^^^^
+
error: `#[must_use]` has no effect when applied to an associated const
--> $DIR/unused_attributes-must_use.rs:68:5
|
@@ -171,5 +183,5 @@ error: unused return value of `Use::get_four` that must be used
LL | ().get_four();
| ^^^^^^^^^^^^^^
-error: aborting due to 26 previous errors
+error: aborting due to 28 previous errors