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

Example of enum's use seems outdated #1134

Closed
PumpkinSeed opened this issue Dec 21, 2018 · 2 comments
Closed

Example of enum's use seems outdated #1134

PumpkinSeed opened this issue Dec 21, 2018 · 2 comments

Comments

@PumpkinSeed
Copy link

Currently I'm reading/learning the enum_use section where I got the following error for the use inside the main function:

imports can only refer to extern crate names passed with `--extern` on stable channel (see issue #53130) 

Please guide me if I missed something. Thank you.

@codesections
Copy link
Contributor

codesections commented Dec 23, 2018

I encountered this issue as well, and it appears to be a 2018 Edition issue. The code compiles correctly with the under then 2015 Edition but fails to compile (with the error provided above) under the 2018 Edition.

Under the 2018 Edition, the use Status::{Poor, Rich}; should be use crate::Status::{Poor, Rich};. I will submit a PR with this change in case that is helpful, but please feel free to handle it differently if there is a better resolution.

@ghost
Copy link

ghost commented Jan 12, 2019

Since #1136 was merged (albeit manually) maybe this can be closed now?

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

No branches or pull requests

3 participants