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

identify traits in libstd that should use associated constants #17825

Closed
pnkfelix opened this issue Oct 6, 2014 · 3 comments
Closed

identify traits in libstd that should use associated constants #17825

pnkfelix opened this issue Oct 6, 2014 · 3 comments
Labels
P-medium Medium priority

Comments

@pnkfelix
Copy link
Member

pnkfelix commented Oct 6, 2014

as a subtask of #17307, once associated constants are implemented, we will want to update libstd to use them, rather than continuing to use methods to encode such constants.

A quick ack of the code base via ack --rust 'fn [^\(\)]*\(\) -> Self' shows the following candidate traits for being modified with associated constants:

  • core::default::Default (but this is probably not a great idea; we probably want to continue allowing arbitrary code to be associated with constructing a default value)
  • various numeric traits (but Gankro points out here that perhaps all of these numeric traits will be scrapped in our stdlib anyway)
    • core::num::Zero
    • core::num::One
    • core::num::Bounded
    • core::num::Float
  • core::ptr::RawPtr<T>
@pnkfelix
Copy link
Member Author

pnkfelix commented Oct 7, 2014

Blocked by #17841.

Nominating for P-backcompat-libs, not 1.0.

@pnkfelix
Copy link
Member Author

pnkfelix commented Oct 9, 2014

Assigning P-high, not 1.0

@pnkfelix pnkfelix added P-medium Medium priority and removed I-nominated labels Oct 9, 2014
@aturon
Copy link
Member

aturon commented Jan 8, 2015

Closing; this will fall out of the small amount of relevant remaining stabilization (mostly around the num traits).

@aturon aturon closed this as completed Jan 8, 2015
lnicola pushed a commit to lnicola/rust that referenced this issue Aug 13, 2024
internal: Offload diagnostics serialization to the task pool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-medium Medium priority
Projects
None yet
Development

No branches or pull requests

3 participants