diff options
| author | Eric Huss <eric@huss.org> | 2022-05-22 18:34:37 -0700 |
|---|---|---|
| committer | Eric Huss <eric@huss.org> | 2022-08-11 21:48:39 -0700 |
| commit | dcd5177fd43d5fdd9b89a7700fe3c283a9a52a48 (patch) | |
| tree | 2811f41f4860579fc830121cb7b9ac176f8e693f /src/test | |
| parent | 6c7cb2bb770d43d1078bfbf3d14e7b4197b23900 (diff) | |
| download | rust-dcd5177fd43d5fdd9b89a7700fe3c283a9a52a48.tar.gz rust-dcd5177fd43d5fdd9b89a7700fe3c283a9a52a48.zip | |
Add visitors for PatField and ExprField.
This helps simplify the code. It also fixes it to use the correct parent when lowering. One consequence is the `non_snake_case` lint needed to change the way it looked for parent nodes in a struct pattern. This also includes a small fix to use the correct `Target` for expression field attribute validation.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/lint/unused/unused_attributes-must_use.stderr | 2 |
1 files changed, 1 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 69cd5302c5c..dd112c23e5d 100644 --- a/src/test/ui/lint/unused/unused_attributes-must_use.stderr +++ b/src/test/ui/lint/unused/unused_attributes-must_use.stderr @@ -105,7 +105,7 @@ 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 pattern field +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 }; |
