Skip to content

Replace macro impls in libstd/num/strconv.rs with generic impls #4955

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

Closed
Kimundi opened this issue Feb 15, 2013 · 8 comments
Closed

Replace macro impls in libstd/num/strconv.rs with generic impls #4955

Kimundi opened this issue Feb 15, 2013 · 8 comments
Labels
A-syntaxext Area: Syntax extensions C-cleanup Category: PRs that clean code up or issues documenting cleanup.

Comments

@Kimundi
Copy link
Member

Kimundi commented Feb 15, 2013

The impl macros in libstd/num/strconv.rs should get replaced by two generic impls for the not yet existing Integral and Floating traits once those traits exists, and once the compiler supports multiple generic impls against different traits.

@pnkfelix
Copy link
Member

As the bug description says, this is blocked by revisions to the numeric traits, which I think are being tracked in Issue #4819.

@Kimundi
Copy link
Member Author

Kimundi commented Jun 14, 2013

Also, the bug might become irrelevant because I'm kinda working on re-replacing that central trait with macro-generated specialized versions for ints, uints and floats. But that hasn't landed yet, so for now this is still relevant.

@alexcrichton
Copy link
Member

In theory the change to make is to write something like impl<T: Integer> NumStrConv for T, but this is currently blocked on some resolve bugs because if you do this for both T:Integer and T:Float you get multiple implementation of a trait errors.

@huonw
Copy link
Member

huonw commented Aug 27, 2013

Triage: the macros are still there; this is part of #6220.

@flaper87
Copy link
Contributor

Triage: Updated the title and description s/libcore/libstd/ the macros are still there

@aturon
Copy link
Member

aturon commented Jan 8, 2015

@bjz do you still plan to work on this (and to hide strconv from the public API)?

@brendanzab
Copy link
Member

Yes, I do, sorry for the delay.

@brson
Copy link
Contributor

brson commented Apr 24, 2015

There are no numeric traits now and this won't happen.

@brson brson closed this as completed Apr 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-syntaxext Area: Syntax extensions C-cleanup Category: PRs that clean code up or issues documenting cleanup.
Projects
None yet
Development

No branches or pull requests

8 participants