about summary refs log tree commit diff
path: root/src/doc/reference.md
AgeCommit message (Collapse)AuthorLines
2021-07-10Update reference.mdManuel Drehwald-1/+1
Apparently the Rust reference has moved again, so the link gave a 404 error.
2017-02-21Redirect to the new referenceSteve Klabnik-4410/+3
2017-02-20Revert "Fix up links"Steve Klabnik-3/+3
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-02-15Stabilize field init shorthandest31-1/+0
Closes #37340.
2017-02-13Fix up linksSteve Klabnik-3/+3
mdbook and rustdoc generate links differently, so we need to change all these links.
2017-02-11Improve grammar on field init docsJake Goulding-6/+2
2017-02-08Rollup merge of #37928 - chriskrycho:document-rfc-1623, r=steveklabnikCorey Farwell-9/+60
Document RFC 1623: static lifetime elision. This should be the last item required for stabilizing RFC 1623 (#35897).
2017-02-08Add more examples, get everything passing at last.Chris Krycho-6/+33
2017-02-07Rollup merge of #39459 - phungleson:fix-short-hand-struct-doc, r=steveklabnikCorey Farwell-0/+22
Fix short hand struct doc Don't want to discredit @hngiang effort on this issue. I just want to lend a hand to fix this issue #38830, it is a very nice feature and is seemingly completed. Fixes #39096 r? @steveklabnik
2017-02-07reference: clarify #[cfg] sectionAlex Burka-5/+13
2017-02-03Simplify wording & fix test src/docSon-2/+7
2017-02-02Wrap 80 columnsSon-2/+6
2017-02-02Add explain struct field init shorthandGiang Nguyen-0/+13
2017-01-28Change placement of `[Unstable]` marker in RFC 1623 docs.Chris Krycho-5/+5
2017-01-28Add feature flag to reference docs for RFC 1623.Chris Krycho-1/+2
2017-01-22Fix minor typoEijebong-1/+1
2017-01-20linkchecker: Fix checking links which are just fragmentsOliver Middleton-4/+4
Also fix a typo which linkchecker should have caught.
2017-01-04Document custom derive.Steve Klabnik-8/+42
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-01-03Document RFC 1623: static lifetime elision.Chris Krycho-6/+29
2016-12-27Document foreign variadic functions in TRPL and the reference.Corey Farwell-0/+9
Fixes https://github.com/rust-lang/rust/issues/38485.
2016-12-13Associated items and variants inherit visibility from their traits and enums ↵Liigo-1/+1
respectively.
2016-12-13minor fix about visibility in referenceLiigo Zhuang-1/+2
2016-12-07Rollup merge of #38163 - durka:patch-33, r=blussGuillaume Gomez-1/+2
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).
2016-12-04reference: fix definition of :ttAlex Burka-1/+2
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).
2016-12-04Auto merge of #38087 - jooert:remove_unmarked, r=petrochenkovbors-5/+0
Remove the `unmarked_api` feature Closes #37981.
2016-12-02Update items section in referencejethrogb-4/+5
Make clear that items must be definitions, and add missing extern block
2016-11-30Remove the `unmarked_api` featureJohannes Oertel-5/+0
Closes #37981.
2016-11-19reference: fix duplicate bullet points in feature listGeorg Brandl-8/+9
2016-11-10Rollup merge of #37664 - est31:master, r=nrcEduard-Mihai Burtescu-2/+6
Document the question mark operator in reference and the book's syntax index The question mark operator will be stabilized for the Rust 1.13 release (unfortunately). Even though I don't like the operator, it still should be documented in the syntax index in the book and in the reference. Maybe there are people who also want to change the book's chapters on error handling, depending on their views of what idiomatic error handling is, now that the operator is stable, but I don't want to and I'd prefer to keep this PR focused on the reference and syntax index only. Please also apply this PR to the beta branch of rust.
2016-11-09Document the question mark operatorest31-2/+6
2016-11-08Rollup merge of #35102 - steveklabnik:ref_warning, r=aturonSteve Klabnik-0/+5
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. r? @aturon
2016-11-08Auto merge of #36843 - petrochenkov:dotstab, r=nikomatsakisbors-2/+0
Stabilize `..` in tuple (struct) patterns I'd like to nominate `..` in tuple and tuple struct patterns for stabilization. This feature is a relatively small extension to existing stable functionality and doesn't have known blockers. The feature first appeared in Rust 1.10 6 months ago. An example of use: https://github.com/rust-lang/rust/pull/36203 Closes https://github.com/rust-lang/rust/issues/33627 r? @nikomatsakis
2016-11-06Auto merge of #37386 - johnthagen:Self-reference-example, r=GuillaumeGomezbors-0/+15
Add example using Self to reference When I first came across `Self` I had a hard time finding references to it in the docs (and it's also been asked about on [StackOverflow](http://stackoverflow.com/questions/32304595/whats-the-difference-between-self-and-self). I hope this example provides someone who comes across it for the first time a little more help. If there is a better way to show an example actually using `Self`, I'm happy to modify this. It was just the simplest place to start I could see.
2016-11-05Use From trait as an example usage of Self.johnthagen-0/+15
2016-11-03Stabilize `..` in tuple (struct) patternsVadim Petrochenkov-2/+0
2016-10-29Auto merge of #37378 - petrochenkov:nopat, r=eddybbors-3/+3
Prohibit patterns in trait methods without bodies They are not properly type checked ```rust trait Tr { fn f(&a: u8); // <- This compiles } ``` , mostly rejected by the parser already and generally don't make much sense. This PR is kind of a missing part of https://github.com/rust-lang/rust/pull/35015. Given the [statistics from crater](https://github.com/rust-lang/rust/pull/37378#issuecomment-256154994), the effect of this PR is mostly equivalent to improving `unused_mut` lint. cc https://github.com/rust-lang/rust/issues/35078#issuecomment-255707355 https://github.com/rust-lang/rust/pull/35015 https://github.com/rust-lang/rfcs/pull/1685 https://github.com/rust-lang/rust/issues/35203 r? @eddyb
2016-10-27reference: Mention --crate-type=cdylib in the Linkage sectionFederico Mena Quintero-0/+6
2016-10-26Prohibit patterns in trait methods without bodiesVadim Petrochenkov-3/+3
2016-10-12Stabilise attributes on statements.Nick Cameron-2/+1
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)
2016-10-07Rollup merge of #37008 - tshepang:quotes, r=steveklabnikGuillaume Gomez-3/+3
reference: use ticks instead of quotes
2016-10-06reference: use ticks instead of quotesTshepang Lekhonkhobe-3/+3
2016-10-05reference: mention `move` keyword for lambdasangelsl-2/+7
2016-09-30Add `Send` and `Sync` traits to the referenceWesley Wiser-0/+10
Fixes #36859
2016-09-08added feature description to referenceAndre Bogus-0/+3
2016-09-04Remove mention of `unsafe_no_drop_flag` from Reference and NomiconAndrew Paseltiner-10/+0
2016-09-02Rollup merge of #35754 - QuietMisdreavus:must-use-reference, r=ManishearthJonathan Turner-0/+3
Add `must_use` to the Reference I'm a bit uncertain about the exact phrasing, but having it mentioned at all is probably better than before.
2016-08-30Add the sysv64 calling convention to the list of known calling conventions ↵CensoredUsername-0/+4
and add the feature(abi_sysv64) to the list of known features
2016-08-23reference: add trailing commasTshepang Lekhonkhobe-2/+2
2016-08-17Add `must_use` to the ReferenceQuietMisdreavus-0/+3
2016-08-06Finish fixing the operator precedence tablesubsan-1/+2
Add the unstable `:` colon and `<-` inplace operators.