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

Remove unneeded extern crate serde #62

Closed
dtolnay opened this issue Aug 28, 2017 · 1 comment
Closed

Remove unneeded extern crate serde #62

dtolnay opened this issue Aug 28, 2017 · 1 comment
Labels

Comments

@dtolnay
Copy link
Member

dtolnay commented Aug 28, 2017

Since rust-lang/rust#42588, Rust warns by default on unused extern crates. The example on the homepage, as well as possibly other examples on the website, has extern crate serde but does not refer to anything from it. It is there as a reminder that the generated code requires serde to be listed as a dependency in Cargo.toml.

I imagine we can make up for it by providing an explicit Cargo.toml snippet instead.

[dependencies]
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"
@dtolnay
Copy link
Member Author

dtolnay commented Sep 10, 2017

I would prefer to consider this a false positive and fix it in Rust instead. rust-lang/rust#44294

@dtolnay dtolnay closed this as completed Sep 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant