Documentation for libsyntax & friends?


#1

Google has a cache for syntax::ast and friends: https://webcache.googleusercontent.com/search?q=cache:M_jpC5yRFfAJ:https://doc.rust-lang.org/syntax/ast/struct.Ident.html+&cd=1&hl=en&ct=clnk&gl=ca

But the site isn’t up https://doc.rust-lang.org/syntax/ast/struct.Ident.html

Is there somewhere else we could look at the documentation for syntax::ast?


#2

Here: http://manishearth.github.io/rust-internals-docs/syntax/index.html


#3

Is there a reason it’s no longer on the official site?


#4

It’s rustc_private (and marked as such). Thus, you must use nightly to work with it and add a feature flag to your code. Apart from us linting folks and phildawes (who now uses syntex), no one needs it, and it really bloats the documentation, to the tune of several megabytes, IIRC.


#5

It should also be easy to build locally, right?


#6

Yep: configure --enable-compiler-docs && make docs


#7

It’s not difficult, it just takes forever. (I typically need these docs when updating plugins to a new rustc nightly, so I’d need to rebuild to get up-to-date docs.)


#8

That’s not true. Any crate that defines a compiler plugin (not just lints) could also benefit from it, of which I maintain several. (There are others too, I think Servo has a few?)


#9

Ok, I stand corrected. :blush: But the vast majority of Rustaceans won’t write any non-lint compiler plugin soon.


#10

it could also be used for other things analysing syntax