Commit Graph

415 Commits

Author SHA1 Message Date
Steve Klabnik 24ce89e7cd Redirect to the new reference 2017-03-02 14:57:38 -08:00
Steve Klabnik f9177f3fc7 Revert "Fix up links"
This reverts commit 7f1d1c6d9a7be5e427bace30e740b16b25f25c92.

The original commit was created because mdBook and rustdoc had
different generation algorithms for header links; now with
https://github.com/rust-lang/rust/pull/39966 , the algorithms
are the same. So let's undo this change.

... when I came across this problem, I said "eh, this isn't fun,
but it doesn't take that long." I probably should have just actually
taken the time to fix upstream, given that they were amenable. Oh
well!
2017-03-02 14:57:36 -08:00
est31 b40106fb2a Stabilize field init shorthand
Closes #37340.
2017-03-02 14:57:36 -08:00
Steve Klabnik 5833cc94ba Fix up links
mdbook and rustdoc generate links differently, so we need to change all
these links.
2017-03-02 14:57:35 -08:00
Jake Goulding b01642916b Improve grammar on field init docs 2017-03-02 14:57:35 -08:00
Chris Krycho 165c4be2e2 Add more examples, get everything passing at last. 2017-03-02 14:57:35 -08:00
Chris Krycho 2549f4b706 Change placement of `[Unstable]` marker in RFC 1623 docs. 2017-03-02 14:57:35 -08:00
Chris Krycho 9797537daf Add feature flag to reference docs for RFC 1623. 2017-03-02 14:57:35 -08:00
Chris Krycho b836c03d9d Document RFC 1623: static lifetime elision. 2017-03-02 14:57:35 -08:00
Son c8a2a0a182 Simplify wording & fix test src/doc 2017-03-02 14:57:35 -08:00
Son 91c7daa350 Wrap 80 columns 2017-03-02 14:57:35 -08:00
Giang Nguyen 0f8a53bfe1 Add explain struct field init shorthand 2017-03-02 14:57:35 -08:00
Alex Burka 3d4f876eb5 reference: clarify #[cfg] section 2017-03-02 14:57:35 -08:00
Eijebong c07af1c14d Fix minor typo 2017-03-02 14:57:34 -08:00
Oliver Middleton 6b129dd979 linkchecker: Fix checking links which are just fragments
Also fix a typo which linkchecker should have caught.
2017-03-02 14:57:34 -08:00
Steve Klabnik 11ac55ac4e Document custom derive.
These are some bare-bones documentation for custom derive, needed
to stabilize "macros 1.1",
https://github.com/rust-lang/rust/issues/35900

The book chapter is based off of a blog post by @cbreeden,
https://cbreeden.github.io/Macros11/

Normally, we have a policy of not mentioning external crates in
documentation. However, given that syn/quote are basically neccesary
for properly using macros 1.1, I feel that not including them here
would make the documentation very bad. So the rules should be bent
in this instance.
2017-03-02 14:57:34 -08:00
Corey Farwell 7f14ddc27e Document foreign variadic functions in TRPL and the reference.
Fixes https://github.com/rust-lang/rust/issues/38485.
2017-03-02 14:57:34 -08:00
Liigo 1c9336d9f2 Associated items and variants inherit visibility from their traits and enums respectively. 2017-03-02 14:57:34 -08:00
Liigo Zhuang 0a13e5fa96 minor fix about visibility in reference 2017-03-02 14:57:34 -08:00
Alex Burka 58dd393692 reference: fix definition of :tt
The reference says that $x:tt matches "either side of the `=>` in macro_rules` which is technically true but completely uninformative. This changes that bullet point to what the book says (a single token or sequence of token trees inside brackets).
2017-03-02 14:57:34 -08:00
Johannes Oertel 9a1ece6307 Remove the `unmarked_api` feature
Closes #37981.
2017-03-02 14:57:34 -08:00
jethrogb 7a25fc4bb8 Update items section in reference
Make clear that items must be definitions, and add missing extern block
2017-03-02 14:57:34 -08:00
Georg Brandl 87dc7f5e25 reference: fix duplicate bullet points in feature list 2017-03-02 14:57:34 -08:00
est31 ef36c47523 Document the question mark operator 2017-03-02 14:57:34 -08:00
Steve Klabnik cfaf168424 Make it clear that the reference isn't normative
Any time someone edits the reference, it has to be taken very seriously,
since it's the closest thing we have to a specification. This commit
adds language which indicates that this is not a normative document,
which makes it easier to make tweaks without worrying about forever
harming the future of Rust by painting ourselves in a corner.
2017-03-02 14:57:33 -08:00
Vadim Petrochenkov c07803c2a9 Stabilize `..` in tuple (struct) patterns 2017-03-02 14:57:33 -08:00
johnthagen c83e539e1d Use From trait as an example usage of Self. 2017-03-02 14:57:33 -08:00
Vadim Petrochenkov 5c6856d480 Prohibit patterns in trait methods without bodies 2017-03-02 14:57:33 -08:00
Federico Mena Quintero 89544b4bba reference: Mention --crate-type=cdylib in the Linkage section 2017-03-02 14:57:33 -08:00
Nick Cameron 8dc97768c9 Stabilise attributes on statements.
Note that attributes on expressions are still unstable and are behind the `stmt_expr_attributes` flag.

cc [Tracking issue](https://github.com/rust-lang/rust/issues/15701)
2017-03-02 14:57:33 -08:00
Tshepang Lekhonkhobe 9f22250194 reference: use ticks instead of quotes 2017-03-02 14:57:33 -08:00
angelsl 80be46c5a8 reference: mention `move` keyword for lambdas 2017-03-02 14:57:33 -08:00
Wesley Wiser f8f42a746e Add `Send` and `Sync` traits to the reference
Fixes #36859
2017-03-02 14:57:33 -08:00
Andre Bogus 46d7ba36e5 added feature description to reference 2017-03-02 14:57:33 -08:00
Andrew Paseltiner 7e333005b8 Remove mention of `unsafe_no_drop_flag` from Reference and Nomicon 2017-03-02 14:57:32 -08:00
QuietMisdreavus d1fea97ac7 Add `must_use` to the Reference 2017-03-02 14:57:32 -08:00
CensoredUsername 8e0c53c362 Add the sysv64 calling convention to the list of known calling conventions and add the feature(abi_sysv64) to the list of known features 2017-03-02 14:57:32 -08:00
Tshepang Lekhonkhobe ffe0de4069 reference: add trailing commas 2017-03-02 14:57:32 -08:00
ubsan 2baf3ec3b1 Finish fixing the operator precedence tables
Add the unstable `:` colon and `<-` inplace operators.
2017-03-02 14:57:32 -08:00
ubsan 79468a6788 Fix precedence table in reference 2017-03-02 14:57:32 -08:00
ubsan e589352744 Add vectorcall and fastcall explanation 2017-03-02 14:57:32 -08:00
ubsan 985aadc3d6 First commit, fix ABI string docs in reference.md 2017-03-02 14:57:32 -08:00
Isaac Andrade 9223853c25 Improve language. 2017-03-02 14:57:32 -08:00
Isaac Andrade 0623388549 Add mention to RFC 940 in the Rust Reference.
- It also keeps mentions to RFCs consistent with the format "RFC XXX"
2017-03-02 14:57:31 -08:00
abhi 2fe3f6d2ea Update on struct expressions (check #32769) 2017-03-02 14:57:31 -08:00
Alex Burka 6dc14fb7d7 include list of characters 2017-03-02 14:57:31 -08:00
Alex Burka fb8ad0124a update reference for #29734 2017-03-02 14:57:31 -08:00
Liigo Zhuang ef32c065e3 reference: link to proper ffi attributes 2017-03-02 14:57:31 -08:00
Chris Krycho 70068de4cb Update reference to indicate stabilization of `deprecated` attribute. 2017-03-02 14:57:31 -08:00
Vadim Petrochenkov d0c22d811e Implement `..` in tuple (struct) patterns 2017-03-02 14:57:31 -08:00