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

Guide does not explain the namespaced enums #19556

Closed
lifthrasiir opened this issue Dec 5, 2014 · 2 comments · Fixed by #19616
Closed

Guide does not explain the namespaced enums #19556

lifthrasiir opened this issue Dec 5, 2014 · 2 comments · Fixed by #19616

Comments

@lifthrasiir
Copy link
Contributor

We have lots of the legacy of non-namespaced enums throughout the guide:

  • Section 8.4 and 9 should use Ordering::{Less, Equal, Greater} instead of {Less, Equal, Greater} (cf. The enum type in Guide is not working #17967, Update guide to reflect changes to enums. #19551).
  • Section 8.4 contains StringResult::{StringOK, ErrorReason}, which probably should be renamed.
  • Section 22 contains OptionalFloat64::{Valuef64, Missingf64}, which probably should be renamed.
  • Section 22 introduces a generic Option<T>, but doesn't mention that its variants are reexported by default. (In fact, the guide doesn't mention that variants can be reexported at all.)
@steveklabnik
Copy link
Member

  • It's in the prelude, so it's fine.
  • These are named this way because we haven't introduced Generics yet
  • Same here
  • Same deal, prelude.

That being said, mentioning that enums are namespaced would be a good idea, so I'm going to leave this ticket open as a TODO to add that.

@steveklabnik
Copy link
Member

(I actually thought I already had such a TODO issue, but cannot find it.)

steveklabnik added a commit to steveklabnik/rust that referenced this issue Dec 7, 2014
alexcrichton added a commit to alexcrichton/rust that referenced this issue Dec 9, 2014
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 a pull request may close this issue.

2 participants