-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Remove pub from core::{unicode,cmath,stackwalk,rt} #6226
Conversation
I think |
If you can't use anything out of a non-pub |
cc #6199 |
@alexcrichton siblings can access items in private mods
|
I r+'d because I want those modules to be private, but I do think this is exploiting a resolve bug. I think that absolute path resolution always assumes that private mods are inaccessible, even when the path is stated in a module that should have access to the path. e.g.
Relative paths do work
imo this is bogus, and visibility should be interpreted the same way for either absolute or relative paths. |
So just out of curiosity, let's say that there's a private module
Are those true? Additionally, is there a section in the manual or some documentation explaining all this? If not, I'd be willing to take a stab at writing something up (in addition to looking into the resolve bugs if they exist). |
I just removed `pub mod` from `core.rc` and then got everything to compile again. One thing I'm worried about is an import like this: ```rust use a; use a::b; mod a { pub type b = int; } mod b { use a; // bad use a::b; // good } ``` I'm not sure if `use a::b` being valid is a bug or intended behavior (same question about `use a`). If it's intended behavior, then I got around these modules not being public by only importing the specific members that are necessary. Otherwise that probably needs an open issue.
I opened a subsequent issue to deal with the resolve bugs (cc'd previously) |
Add lint for comparing to empty slices instead of using .is_empty() Hey first time making a clippy lint I added the implementation of the lint the `len_zero` since it shared a lot of the code, I would otherwise have to rewrite. Just tell me if the lint should use it's own file instead changelog: Add lint for comparing to empty slices Fixes rust-lang#6217
I just removed
pub mod
fromcore.rc
and then got everything to compile again. One thing I'm worried about is an import like this:I'm not sure if
use a::b
being valid is a bug or intended behavior (same question aboutuse a
). If it's intended behavior, then I got around these modules not being public by only importing the specific members that are necessary. Otherwise that probably needs an open issue.