Philipp Hansch
92f2bbbe06
Fix macro issues with field_reassign_with_default
2021-01-05 20:31:13 +01:00
Matthias Krüger
5d48b91b40
field_reassign_with_default: don't expand macros in suggestion
...
fixes #6522
changelog: field_reassign_with_default: don't expand macros in lint suggestion (#6522 )
2021-01-01 17:01:09 +01:00
Cameron Steffen
c6450c70dd
Fix field_reassign_with_default for private fields
2020-12-22 11:09:46 -06:00
Cameron Steffen
73ce34a197
Remove redundant shadow check
...
There is already an assertion that consecutive lines assign to a struct
field.
2020-12-22 10:51:56 -06:00
Cameron Steffen
8bdf34e10c
Fix default initialized fields in suggestion
...
The default value for a field type does not necessarily match the
default value for that field in the struct Default.
2020-12-22 10:51:56 -06:00
Cameron Steffen
fff5fa6581
Eat collapsible_match dogfood
2020-11-29 15:34:11 -06:00
Henri Lunnikivi
7b203f3da6
Implement field_reassign_with_default
...
- Implement `field_reassign_with_default` as a `LateLintPass`
- Avoid triggering `default_trait_access` on a span already linted by
`field_reassigned_with_default`
- Merge `default_trait_access` and `field_reassign_with_default` into
`Default`
- Co-authored-by: Eduardo Broto <ebroto@tutanota.com>
- Fixes #568
2020-10-31 15:49:58 +02:00