Skip to content

Move rustc docs to the book #22126

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

Merged
merged 3 commits into from
Feb 15, 2015
Merged

Move rustc docs to the book #22126

merged 3 commits into from
Feb 15, 2015

Conversation

steveklabnik
Copy link
Member

This is super black magic internals at the moment, but having it
somewhere semi-public seems good. The current versions weren't being
rendered, and they'll be useful for some people.

Fixes #21281

r? @nikomatsakis @kmcallister

@huonw
Copy link
Member

huonw commented Feb 10, 2015

Hm, general note, the trpl directory is getting quite busy: https://github.com/steveklabnik/rust/tree/gh21281/src/doc/trpl

Is it possible to e.g. put these into an internals subdirectory?

@steveklabnik
Copy link
Member Author

Maybe. It ends up making more nested URLs, and I don't remember if Rustbook supports that or not.


fn bar() {
let x: @mut int = @mut 3;
let y: @int = @3;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, this is a blast from the past.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heh, yeah, I was solely looking to move stuff, not to update it.

@kmcallister
Copy link
Contributor

Looks good to me. I wholeheartedly approve of putting these in the book. It's great to have a peek behind the curtain even if the only takeaway is "o_O".

In particular I think the borrowchecker docs are important if you want a precise understanding of Rust semantics. It's more conceptual than a purely internal thing. It might even be a good starting point for an "advanced borrowchecker" chapter in Part III.

(Actually, what I really would like to do is implement a toy borrowchecker for a subset of Rust, as a way to solidify my own understanding, and produce a blog series / literate code repo / something along the way. But who knows when I'll have time to do that...)

btw, I agree with the choice to keep trans doc in the source tree. That stuff is internal details even compared to the rest of these docs.

@kmcallister
Copy link
Contributor

The reference to middle::infer::higher_ranked::doc in trait-resolution.md should also become a link.

@kmcallister
Copy link
Contributor

Might want to add an informative sidebar somewhere on the subject of "What the hell does 'skolemize' mean?"

@nikomatsakis
Copy link
Contributor

Hmm, I don't know how I feel about having these outside the compiler source code. The whole idea is that when browsing code in directory foo you can look for a doc.rs to get a more detailed look. That is, they are extended code comments.

@nikomatsakis
Copy link
Contributor

(They are already somewhat dated and ever at risk for being out of date, putting them in "the book" makes that even more likely it seems to me.)

@kmcallister
Copy link
Contributor

The whole idea is that when browsing code in directory foo you can look for a doc.rs to get a more detailed look.

In that case maybe they should be named README.md so you can browse them on GitHub. Rendering through rustdoc didn't work that well, I guess because some of these modules are private.

This is super black magic internals at the moment, but having it
somewhere semi-public seems good. The current versions weren't being
rendered, and they'll be useful for some people.

Fixes rust-lang#21281
@steveklabnik
Copy link
Member Author

Good idea, @kmcallister . Done. What do you think, @nikomatsakis ?

@kmcallister
Copy link
Contributor

Should also help them stand out in the directory listing.

@nikomatsakis
Copy link
Contributor

@bors r+ fc3bb17

@nikomatsakis
Copy link
Contributor

seems good to me!

@bors
Copy link
Collaborator

bors commented Feb 13, 2015

⌛ Testing commit fc3bb17 with merge e89dbed...

@bors
Copy link
Collaborator

bors commented Feb 13, 2015

💔 Test failed - auto-mac-64-opt

@steveklabnik
Copy link
Member Author

Oops, forgot to remove a few mod doc lines.

@steveklabnik
Copy link
Member Author

@bors: r=nikomatsakis 14a0e4a

@steveklabnik
Copy link
Member Author

@bors: r=nikomatsakis ad2efdc

@bors
Copy link
Collaborator

bors commented Feb 13, 2015

⌛ Testing commit ad2efdc with merge b98a476...

@bors
Copy link
Collaborator

bors commented Feb 13, 2015

💔 Test failed - auto-win-32-opt

@steveklabnik
Copy link
Member Author

@bors: retry

@bors
Copy link
Collaborator

bors commented Feb 14, 2015

⌛ Testing commit ad2efdc with merge 3f906bf...

@bors
Copy link
Collaborator

bors commented Feb 14, 2015

💔 Test failed - auto-mac-64-opt

@steveklabnik
Copy link
Member Author

@bors: r=nikomatsakis bdc730e

@bors
Copy link
Collaborator

bors commented Feb 14, 2015

⌛ Testing commit bdc730e with merge 3bf0df7...

@bors
Copy link
Collaborator

bors commented Feb 14, 2015

💔 Test failed - auto-win-64-nopt-t

@steveklabnik
Copy link
Member Author

@bors: retry

bors added a commit that referenced this pull request Feb 15, 2015
This is super black magic internals at the moment, but having it
somewhere semi-public seems good. The current versions weren't being
rendered, and they'll be useful for some people.

Fixes #21281

r? @nikomatsakis @kmcallister
@bors
Copy link
Collaborator

bors commented Feb 15, 2015

⌛ Testing commit bdc730e with merge b6d91a2...

@bors bors merged commit bdc730e into rust-lang:master Feb 15, 2015
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.

librustc_borrowck/borrowck/doc.rs doesn't get rendered
5 participants