Skip to content

in which the non-shorthand patterns lint keeps its own counsel in macros#49614

Merged
bors merged 1 commit intorust-lang:masterfrom
zackmdavis:the_phantom_menace
Apr 12, 2018
Merged

in which the non-shorthand patterns lint keeps its own counsel in macros#49614
bors merged 1 commit intorust-lang:masterfrom
zackmdavis:the_phantom_menace

Conversation

@zackmdavis
Copy link
Copy Markdown
Contributor

In issue #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 #49588.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants