Uh oh!
There was an error while loading. Please reload this page.
Remove pub from core::{unicode,cmath,stackwalk,rt} - #6226
Conversation
catamorphism
commented
May 3, 2013
I think |
alexcrichton
commented
May 3, 2013
If you can't use anything out of a non-pub |
alexcrichton
commented
May 4, 2013
cc #6199 |
brson
commented
May 6, 2013
@alexcrichton siblings can access items in private mods |
brson
commented
May 6, 2013
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. |
alexcrichton
commented
May 6, 2013
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.alexcrichton
commented
May 7, 2013
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 Fixesrust-lang#6217
6207: Extract ImportAssets out of auto_import r=matklad a=Veykril See rust-lang/rust-analyzer#6172 (comment) I couldn't fully pull out `AssistContext` as `find_node_at_offset_with_descend`: https://github.com/rust-analyzer/rust-analyzer/blob/81fa00c5b5d5ffb559a39c7ff5190a2519a8ea61/crates/assists/src/assist_context.rs#L90-L92 requires the `SourceFile` which is private in it and I don't think making it public just for this is the right call? 6224: ⬆️ salsa r=matklad a=matklad bors r+ 🤖 6226: Add reminder to update lsp-extensions.md r=matklad a=matklad bors r+ 🤖 6227: Reduce bors timeout r=matklad a=matklad bors r+ 🤖 Co-authored-by: Lukas Wirth <lukastw97@gmail.com> Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
I just removed
pub modfromcore.rcand then got everything to compile again. One thing I'm worried about is an import like this:I'm not sure if
use a::bbeing 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.