Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress 'extern crate' warning for rust 2018 #1324

Merged
merged 2 commits into from Jun 28, 2018

Conversation

jrobsonchase
Copy link
Contributor

With the 2018 preview, and presumably when the edition is officially released, extern crate will be unidiomatic, and will generate warnings.

This suppresses the warning for the extern crate generated in the Serialize and Deserialize derives.

@jrobsonchase
Copy link
Contributor Author

So this might not actually be needed in the long run. From IRC:

 @steveklabnik | jechase: generally you don't do that; you pick one edition and write your code in it. editions are compatible, so if you write your  
               | code in rust 2018, programs using rust 2015 can use it, and vice versa                                                               
       jechase | Right, but this isn't me writing code, this is serde_derive writing code. I guess the alternative is "don't generate warnings inside 
               | of macros?"                                                                                                                          
 @steveklabnik | ah so                                                                                                                                
 @steveklabnik | i *think* the intention is that macros carry the edition they were deifned in                                                        
 @steveklabnik | so that this doesn't just happen                                                                                                     
 @steveklabnik | i *think* 

Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

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

Thanks! If the compiler ever eliminates this warning then we can remove these lines.

@dtolnay dtolnay merged commit d9c63d0 into serde-rs:master Jun 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants