Skip to content

Conversation

@HMPerson1
Copy link
Contributor

Also, if the type is a reference to an enum, we suggest removing &s and/or dereferencing.

Fixes #3342

@HMPerson1
Copy link
Contributor Author

HMPerson1 commented Oct 21, 2018

not sure what happened here https://travis-ci.org/rust-lang-nursery/rust-clippy/jobs/444259747

@flip1995
Copy link
Member

not sure what happened here

Timeout, happens sometimes. I restarted it

Copy link
Member

@flip1995 flip1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applicability level of this lint is missing.

Could you add a test for calling this function inside of a macro? Most of the time macros result in weird suggestions/behavior.

@flip1995
Copy link
Member

Thanks!

bors r+

bors bot added a commit that referenced this pull request Oct 25, 2018
3346: Add lint for calling `mem::discriminant` on a non-enum type r=flip1995 a=HMPerson1

Also, if the type is a reference to an enum, we suggest removing `&`s and/or dereferencing.

Fixes #3342

Co-authored-by: HMPerson1 <[email protected]>
Co-authored-by: Philipp Krones <[email protected]>
@bors
Copy link
Contributor

bors bot commented Oct 25, 2018

@bors bors bot merged commit d53e6f8 into rust-lang:master Oct 25, 2018
@HMPerson1 HMPerson1 deleted the mem_discrim branch October 25, 2018 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants