| Age | Commit message (Collapse) | Author | Lines |
|
r=alexcrichton
This should block on #14323
|
|
[breaking-change]
|
|
|
|
The current tutorial says that the only way to get master is to build from source, which isn't true anymore - nightly binaries and an installer for Mac OS X are now available at the install page: http://www.rust-lang.org/install.html . Feedback very much welcome! Addresses issue #13578.
|
|
|
|
|
|
[breaking-change]
|
|
There's a fair number of attributes that have to be whitelisted since
they're either looked for by rustdoc, in trans, or as needed. These can
be cleaned up in the future.
|
|
extra::arc -> alloc::arc
|
|
extra::arc -> sync::arc
|
|
The new documentation site has shorter urls, gzip'd content, and index.html
redirecting functionality.
|
|
|
|
|
|
|
|
This is to clarify that match construct doesn't define a new variable, since I
observed a person reading the Rust tutorial who seemed to incorrectly think
that it did. Fixes https://github.com/mozilla/rust/issues/13571 .
|
|
|
|
Especially in the tutorial beginners should not be confused with
wrong terminology. It helps to know the right names for things
when you want to find something in the documentation.
|
|
Tweak the tutorial's section on vectors and strings, to slightly clarify
the difference between fixed-size vectors, vectors, and slices.
|
|
for `~str`/`~[]`.
Note that `~self` still remains, since I forgot to add support for
`Box<self>` before the snapshot.
r? @brson or @alexcrichton or whoever
|
|
Lots of assorted things here and there, all the details are in the commits.
Closes #11712
|
|
for `~str`/`~[]`.
Note that `~self` still remains, since I forgot to add support for
`Box<self>` before the snapshot.
How to update your code:
* Instead of `~EXPR`, you should write `box EXPR`.
* Instead of `~TYPE`, you should write `Box<Type>`.
* Instead of `~PATTERN`, you should write `box PATTERN`.
[breaking-change]
|
|
Update the example to make the usage of `pub mod foo;` much more
apparent, as well as using an example where setting the visibility of
the module is actually necessary.
|
|
Corrected example to to use Rand trait referenced in preceding
description and included an example using the Show trait to print ABC.
|
|
|
|
Combined redundant paragraphs about the match expression and removed a
redundant example.
|
|
Version changed due to a newer requirement in LLVM.
|
|
Improve tutorial discussion of closures, e.g. with respect to type inference and variable capture.
Fix #13621
---- original description follows
I'd like this pulled to master if possible but if not I'd appreciate comments on what I need to change. I found the closures difficult to understand as they were so I tried to explain it so I would've had an easier time understanding it. I think it's better at least, somewhat.
I don't know that everyone liked the `-> ()` I included but I thought explicit is best to aid understanding. I thought it was much harder to understand than it should have been.
[EDIT] - Clicked too early.
This doesn't `make check` without errors on my Xubuntu on Virtualbox machine. Not sure why. I don't think I changed anything problematic. I'll try `make check` on master tomorrow.
Opened https://github.com/mozilla/rust/issues/13621 regarding this.
|
|
This primary fix brought on by this upgrade is the proper matching of the ```
and ~~~ doc blocks. This also moves hoedown to a git submodule rather than a
bundled repository.
Additionally, hoedown is stricter about code blocks, so this ended up fixing a
lot of invalid code blocks (ending with " ```" instead of "```", or ending with
"~~~~" instead of "~~~").
Closes #12776
|
|
|
|
|
|
|
|
|
|
Most important: distinguish function decl sugar for omitting `-> ()`
from type inference on closures. I also tried to add a couple more
examples to further emphasize this distinction. Note that this sugar
(of omitting `-> ()`) is actually already briefly mentioned in an
earlier section, so it is a little tricky deciding whether to put more
material here, or to move it up to the previous section.
Other drive-by fixes:
* Fix the line length of the code blocks to fit in the width provided
in the rendered HTML
* Some minor revisions to wording (e.g. try to clarify in some cases
where a type mismatch is arising).
|
|
|
|
|
|
- Closes #13591. Relevant example: http://adrientetar.legtux.org/cached/rust-docs/struct.CChars.htm
(Had to use `!important` to override CSS selector precedence, namely matching over parent class.)
- Implement changes from #13780 feedback, namely:
* Changed font-size from 18px to 15px
* Reintroduced gray background for code samples
* Tightened up the margins
- Fix point 1 and point 4 of #13804.
Samples:
- [enum.FileType](http://adrientetar.legtux.org/cached/rust-docs/enum.FileType.htm)
- [struct.CChars](http://adrientetar.legtux.org/cached/rust-docs/struct.CChars.htm)
- [std](http://adrientetar.legtux.org/cached/rust-docs/std.htm)
- [std::io](http://adrientetar.legtux.org/cached/rust-docs/io.htm).
r? @brson
|
|
As of cc6ec8df, the Owned closures example uses println! instead of
debug!, making a note about seeing debug seem out-of-place in this
section.
Since debug! is not used elsewhere in the tutorial, remove the note
entirely.
|
|
|
|
Replaced "len" by "length", to match the given code example.
|
|
This pr updates the "Additional tutorials" link in the scope section to match the "What next?" link in the table of contents.
|
|
|
|
Replaced "len" by "length", to match the given code example.
|
|
- Use Fira Sans for headlines, Heuristica for the body (Adobe Utopia derivative). Both are licensed under the SIL OFL license. (I didn't include BoldItalic because it is sparingly used.)
- Split TOC into 2 columns for the docs except manual (too tall, too wide to be readable).
- Some fixes to rustdoc, bring styles in coherency with eachother
- A few tweaks
Two examples: [modified tutorial](http://adrientetar.legtux.org/cached/rust-docs/tutorial.htm) and [modified manual](http://adrientetar.legtux.org/cached/rust-docs/manual.htm).
Rustdoc got some fixes, here is [modified `enum.FileType`](http://adrientetar.legtux.org/cached/rust-docs/enum.FileType.htm), [modified `std`](http://adrientetar.legtux.org/cached/rust-docs/std.htm) and [modified `std::io`](http://adrientetar.legtux.org/cached/rust-docs/io.htm).
#13484, #13485 follow-up.
cc @brson
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|