Skip to content
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

Add pub(restricted) docs #12

Merged
merged 2 commits into from
Mar 27, 2017
Merged

Conversation

cramertj
Copy link
Member

@steveklabnik
Copy link
Member

This text looks good to me! I'm going to have to think about CI....

@petrochenkov
Copy link
Contributor

Could you add three more details

  • path in pub(in path) item must be some parent module of the item.
  • pub(super) and pub(self) are shortcuts for pub(in super) and pub(in self) respectively
  • pub(self) is the same thing as private

@cramertj
Copy link
Member Author

@petrochenkov Is there some reason to use pub(self) that I should mention? It doesn't seem well-motivate to me.

@petrochenkov
Copy link
Contributor

@cramertj
Not yet (but see rust-lang/rust#32770), but it's useful for understanding the model.

@steveklabnik
Copy link
Member

blocked on #14

@steveklabnik
Copy link
Member

Update: this is now unblocked, but we need the feature to stabilize to land.

@petrochenkov
Copy link
Contributor

@steveklabnik
Everything is stabilized already, these docs are the only missing part.

@steveklabnik
Copy link
Member

steveklabnik commented Mar 24, 2017

@petrochenkov running in nightly still requires the flag. Maybe my nightly was out of date?

@steveklabnik
Copy link
Member

Ah, it was. My bad!

@steveklabnik
Copy link
Member

@cramertj can you rebase this please? We can then get it in.

@cramertj cramertj force-pushed the pub-restricted branch 2 times, most recently from ffe0e45 to ea59c13 Compare March 26, 2017 04:10
@cramertj
Copy link
Member Author

Something weird is going on with the tests-- Travis is complaining that it can't find outer_mod in the crate root, but it works just fine when I run it on the playground or using rustc locally. Any ideas?

@matthewjasper
Copy link
Contributor

You need to add # fn main() {} to the example otherwise everything gets wrapped in main.

@cramertj
Copy link
Member Author

@matthewjasper lol ty

@steveklabnik steveklabnik merged commit 94c10a3 into rust-lang:master Mar 27, 2017
@steveklabnik
Copy link
Member

Thanks!

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.

4 participants