Skip to content

Find out why core::float needs explicit exports #1442

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
boggle opened this issue Jan 5, 2012 · 4 comments
Closed

Find out why core::float needs explicit exports #1442

boggle opened this issue Jan 5, 2012 · 4 comments
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR)

Comments

@boggle
Copy link
Contributor

boggle commented Jan 5, 2012

core::float imports from fXY::* which in turn re-exports predicates and functions from cmath.

Turns out the predicates somehow do not get exported unless one uses explicit export statements.

This is a bug and it needs to be investigated where this is coming from.

@marijnh
Copy link
Contributor

marijnh commented Jan 9, 2012

This is by design, if I remember correctly.

@boggle
Copy link
Contributor Author

boggle commented Jan 9, 2012

I thought the rule was: "if you dont have any export statement, all gets exported". If there is anything special about predicates, this should go into the spec.

@marijnh
Copy link
Contributor

marijnh commented Jan 9, 2012

If you don't export anything, everything that is locally defined gets exported, not things that were imported from elsewhere. But maybe that's not what you're referring to here. The code that manages re-exports is young, and might have bugs. Though predicates are just functions, and I don't see a reason why they wouldn't work.

@boggle
Copy link
Contributor Author

boggle commented Jan 9, 2012

Ah ok, i did not realize that imported items are not considered part of the set of local definitions.

@boggle boggle closed this as completed Jan 9, 2012
Kobzol pushed a commit to Kobzol/rust that referenced this issue Dec 30, 2024
bors pushed a commit to rust-lang-ci/rust that referenced this issue Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR)
Projects
None yet
Development

No branches or pull requests

2 participants