-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Documentation hides imports too aggressively #7689
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
Comments
@huonw I wouldn't mind tackling this if no one else is working on it. Is it as simple as removing the prefixed '#' in the .md files? Following the README file in the doc directory, I'm using: pandoc --from=markdown --to=html --number-sections -o tutorial.html tutorial.md to generate tutorial.html. However, the page it produces doesn't include the stylesheets necessary to make it look like the tutorial on rust-lang.org. (http://static.rust-lang.org/doc/tutorial.htm) Do you happen to know how to reproduce the official format? |
@zslayton yes it is just removing the |
@huonw Cool, thanks -- I didn't have NodeJS installed so 'make docs' wasn't doing it initially. I notice that in addition to the 'use' statements, there are also traits and functions that are commented out but referenced. Should I uncomment those as well? They're required in order to compile the examples, but add a fair amount of reading overhead. |
@zslayton yes, but some of them are defined earlier and are just there to make that snippet pass the tests, or are functions in the standard library, so use your discretion about which to uncomment. (Maybe keep that as a separate commit, so it can be more easily modified/dropped if it is deemed too much extra code for the tutorial.) |
@huonw Good call, will do! |
There are a lot of imports in code segments in the tutorial that are hidden in the final output (prefixed with
#
), which makes the code meet a pile of name-resolution errors.In fact,
use std::
is only mentioned 4 times in the whole thing. (Theangle
code of the pattern matching section is a good example of this.)The text was updated successfully, but these errors were encountered: