rust/src/doc
bors 440ef8b154 Auto merge of #30184 - petrochenkov:ascr, r=nikomatsakis
This PR is a rebase of the original PR by @eddyb https://github.com/rust-lang/rust/pull/21836 with some unrebasable parts manually reapplied, feature gate added + type equality restriction added as described below.

This implementation is partial because the type equality restriction is applied to all type ascription expressions and not only those in lvalue contexts. Thus, all difficulties with detection of these contexts and translation of coercions having effect in runtime are avoided.
So, you can't write things with coercions like `let slice = &[1, 2, 3]: &[u8];`. It obviously makes type ascription less useful than it should be, but it's still much more useful than not having type ascription at all.
In particular, things like `let v = something.iter().collect(): Vec<_>;` and `let u = t.into(): U;` work as expected and I'm pretty happy with these improvements alone.

Part of https://github.com/rust-lang/rust/issues/23416
2015-12-19 02:45:15 +00:00
..
book Rollup merge of #30447 - Xmasreturns:Docu, r=steveklabnik 2015-12-18 20:02:14 +05:30
nomicon Change "big ask" to "tall order" in Rustonomicon. 2015-12-17 09:40:02 -08:00
style Fix double word 'be' 2015-11-08 09:39:01 -06:00
complement-design-faq.md Link to lazy_static crate in Design FAQ 2015-12-03 20:11:29 +01:00
complement-lang-faq.md fix tests & rustdoc 2015-11-26 18:22:40 +02:00
complement-project-faq.md We are production ready 2015-09-20 15:53:47 -04:00
favicon.inc
footer.inc
full-toc.inc
grammar.md Allow bare semicolon in grammar doc, closes #28157 2015-10-24 00:45:18 +02:00
guide-crates.md
guide-error-handling.md
guide-ffi.md
guide-macros.md
guide-ownership.md
guide-plugins.md
guide-pointers.md
guide-strings.md
guide-tasks.md
guide-testing.md
guide-unsafe.md
guide.md
index.md Minor tweaks to doc index 2015-11-16 11:48:18 -08:00
intro.md
not_found.md
README.md Fix path to TRPL in doc README 2015-11-30 15:00:30 -05:00
reference.md Auto merge of #30184 - petrochenkov:ascr, r=nikomatsakis 2015-12-19 02:45:15 +00:00
rust.css Update the playpen link for code in the rust book to agree with rustdoc's new style 2015-10-25 16:18:55 -04:00
rust.md
rustc-ux-guidelines.md Add rustc UX guidelines. 2015-11-08 13:23:18 +00:00
rustdoc.md
tutorial.md
uptack.tex
version_info.html.template

Rust documentations

Building

To generate all the docs, follow the "Building Documentation" instructions in the README in the root of the repository. This will convert the distributed Markdown docs to HTML and generate HTML doc for the books, 'std' and 'extra' libraries.

To generate HTML documentation from one source file/crate, do something like:

rustdoc --output html-doc/ --output-format html ../src/libstd/path.rs

(This, of course, requires a working build of the rustdoc tool.)

Additional notes

To generate an HTML version of a doc from Markdown manually, you can do something like:

rustdoc reference.md

(reference.md being the Rust Reference Manual.)

An overview of how to use the rustdoc command is available in the docs. Further details are available from the command line by with rustdoc --help.