Skip to content

Automatically export methods on core numeric types #2717

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
wants to merge 1 commit into from

Conversation

bstrie
Copy link
Contributor

@bstrie bstrie commented Jun 24, 2012

Each numeric type now contains an extensions module that is automatically exported. At the moment each extensions module contains only the impl for the num::num iface. Other impls soon to follow (hopefully), partly contingent on #2716 being fixed.

Each numeric type now contains an extensions module that is automatically
exported. At the moment each extensions module contains only the impl for the
`num::num` iface. Other impls soon to follow (hopefully).
@brson
Copy link
Contributor

brson commented Jun 25, 2012

I don't like this extra 'extensions' module, so I made an additional commit to remove it again, while keeping num exported:

https://github.com/brson/rust/tree/tmp

Testing this on 'try' now. Looking into #2716.

@brson
Copy link
Contributor

brson commented Jun 25, 2012

pushed to incoming

@bstrie
Copy link
Contributor Author

bstrie commented Jun 25, 2012

@brson The only reason that I opted to stick all the impls in an "extensions" mod was in an effort to not pollute the top-level index for the libcore docs (i.e. there'd just be "sometype::extensions" for each type, rather than "sometype::num, sometype::ord, sometype::eq")... but I'm not certain that I even accomplished that.

@brson
Copy link
Contributor

brson commented Jun 26, 2012

Oh, I remember you telling me that now. I thought it was to work around resolve errors.

I don't think that approach will actually work, since core.rs exports extensions::*, effectively pulling all those things into the the top level anyway.

@brson brson closed this Jun 28, 2012
celinval pushed a commit to celinval/rust-dev that referenced this pull request Jun 4, 2024
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 this pull request may close these issues.

2 participants