Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#49614 - zackmdavis:the_phantom_menace, r=pe…
…trochenkov in which the non-shorthand patterns lint keeps its own counsel in macros In issue rust-lang#49588, Michael Lamparski pointed out a scenario in which the non-shorthand-field-patterns lint could be triggered by a macro-expanded pattern, in a way which was direly unwieldy for the macro author to guard against and unreasonable to expect the macro user to take into account. We can avoid this by not linting patterns that come from macro-expansions. Although this entails accepting "false negatives" where the lint could genuinely improve macro-templated code, avoiding the reported "true-but-super-annoying positive" may be worth the trade? (Some precedent for these relative priorities exists as no. 47775 (5985b0b).) Resolves rust-lang#49588.
- Loading branch information