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

Warning at #[derive(Deserialize)] when compiling without prelude #1103

Closed
TimDiekmann opened this issue Nov 29, 2017 · 2 comments
Closed

Warning at #[derive(Deserialize)] when compiling without prelude #1103

TimDiekmann opened this issue Nov 29, 2017 · 2 comments
Labels

Comments

@TimDiekmann
Copy link

TimDiekmann commented Nov 29, 2017

Hi,

When using #[derive(Deserialize)] when compiling with #![no_implicit_prelude], there is a warning about "None". This will be hidden, if use std::option::Option::None; is used, but this shouldn't be required.

warning: variable `None` should have a snake case name such as `none`
   --> [...].rs:212:88
    |
212 | #[derive(Serialize, Deserialize)]
    |                     ^^^^^^^^^^^

Update: there is also an error with Option::Some.

@dtolnay
Copy link
Member

dtolnay commented Nov 30, 2017

Thanks! I released 1.0.22 with a fix for at least one bug that would have triggered this. If it still doesn't work with 1.0.22, could you share the full definition of the struct on line 212?

@TimDiekmann
Copy link
Author

It's now working, thank you!

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

2 participants