about summary refs log tree commit diff
path: root/src/doc/reference.md
AgeCommit message (Collapse)AuthorLines
2015-05-11Rollup merge of #25290 - bluss:docfixes, r=steveklabnikManish Goregaokar-13/+14
Several Minor API / Reference Documentation Fixes - Fix a few small errors in the reference. - Fix paper cuts in the API docs. Fixes #24882 Fixes #25233 Fixes #25250
2015-05-11docs: Fixes in Reference Chapter 6.1Ulrik Sverdrup-13/+14
2015-05-11Four spaces indent, rephrasingJohann-4/+7
2015-05-11Add if let expressions exampleJohann Hofmann-0/+11
2015-05-11Docs: Compile-time bounds check in index expressionJohann Hofmann-4/+11
The reference was claiming all vectors all bounds-checked at run-time, when constant vectors are usually checked at compile-time. For the changed example see http://is.gd/28ak9E
2015-05-10Remove extra parenthesesJan-Erik Rediger-1/+1
2015-05-09Convert #[lang=".."] to #[lang = ".."] for docs too.Nick Hamann-1/+1
2015-05-09Rollup merge of #25216 - barosl:no-more-task, r=ManishearthManish Goregaokar-1/+1
I've found that there are still huge amounts of occurrences of `task`s in the documentation. This PR tries to eliminate all of them in favor of `thread`.
2015-05-08Remove references to deprecated `extern crate "foo" as bar` syntaxCarol Nichols-5/+4
This syntax was removed in b24a3b8 but references remained in the grammar, the reference, rustdoc generation, and some auxiliary test files that don't seem to have been used since 812637e.
2015-05-09Squeeze the last bits of `task`s in documentation in favor of `thread`Barosl Lee-1/+1
An automated script was run against the `.rs` and `.md` files, subsituting every occurrence of `task` with `thread`. In the `.rs` files, only the texts in the comment blocks were affected.
2015-05-07Rollup merge of #25052 - jooert:misc_attr_reference, r=steveklabnikSteve Klabnik-5/+4
Unsafe destructors were removed, added remarks about needed feature gates. cc #16676 r? @steveklabnik
2015-05-03Clean up the grammar around the inline attributeJake Goulding-6/+6
2015-05-02Update "Miscellaneous attributes" section of reference manualJohannes Oertel-5/+4
2015-05-01Rollup merge of #24992 - steveklabnik:gh24730, r=alexcrichtonManish Goregaokar-1/+8
Fixes #24730 r? @alexcrichton
2015-05-01Rollup merge of #24981 - carols10cents:remove-more-priv, r=alexcrichtonManish Goregaokar-2/+1
Hi! While researching stuff for the reference and the grammar, I came across a few mentions of using the `priv` keyword that was removed in 0.11.0 (#13547, #8122, rust-lang/rfcs#26, [RFC 0026](https://github.com/rust-lang/rfcs/blob/master/text/0026-remove-priv.md)). One occurrence is a mention in the reference, a few are in comments, and a few are marking test functions. I left the test that makes sure you can't name an ident `priv` since it's still a reserved keyword. I did a little grepping around for `priv `, priv in backticks, `Private` etc and I think the remaining instances are fine, but if anyone knows anywhere in particular I should check for any other lingering mentions of `priv`, please let me know and I would be happy to! :fallen_leaf: :ocean:
2015-04-30Describe (a,) vs (a) in docsSteve Klabnik-1/+8
Fixes #24730
2015-04-30Auto merge of #24924 - carols10cents:grammar-improvements, r=pnkfelixbors-5/+0
I'm interested in helping out with #16676 but more in the grammar than the reference-- here's my first chunk, more to come!! :tada: I did pull a bit *out* of the reference, though, that was more relevant to the grammar but wasn't moved over as part of #24729. I'm looking at, e.g. https://github.com/rust-lang/rust/blob/master/src/libsyntax/ast.rs, as the source of truth, please let me know if I should be checking against something else instead/in addition. r? @steveklabnik
2015-04-29Remove lingering mention of 'priv' in the referenceCarol Nichols-2/+1
2015-04-29rollup merge of #24871: mbrubeck/doc-editAlex Crichton-1/+1
r? @steveklabnik
2015-04-29rollup merge of #24870: tshepang/reference-fix-bracketsAlex Crichton-2/+2
Also, remove the other brackets, because they make the whole sentence look awkward.
2015-04-28Move explanation that references lexical grammar to the grammarCarol Nichols-5/+0
Reword so that the references to things above/below are up to date and a bit more specific.
2015-04-27Auto merge of #23606 - quantheory:associated_const, r=nikomatsakisbors-1/+4
Closes #17841. The majority of the work should be done, e.g. trait and inherent impls, different forms of UFCS syntax, defaults, and cross-crate usage. It's probably enough to replace the constants in `f32`, `i8`, and so on, or close to good enough. There is still some significant functionality missing from this commit: - ~~Associated consts can't be used in match patterns at all. This is simply because I haven't updated the relevant bits in the parser or `resolve`, but it's *probably* not hard to get working.~~ - Since you can't select an impl for trait-associated consts until partway through type-checking, there are some problems with code that assumes that you can check constants earlier. Associated consts that are not in inherent impls cause ICEs if you try to use them in array sizes or match ranges. For similar reasons, `check_static_recursion` doesn't check them properly, so the stack goes ka-blooey if you use an associated constant that's recursively defined. That's a bit trickier to solve; I'm not entirely sure what the best approach is yet. - Dealing with consts associated with type parameters will raise some new issues (e.g. if you have a `T: Int` type parameter and want to use `<T>::ZERO`). See rust-lang/rfcs#865. - ~~Unused associated consts don't seem to trigger the `dead_code` lint when they should. Probably easy to fix.~~ Also, this is the first time I've been spelunking in rustc to such a large extent, so I've probably done some silly things in a couple of places.
2015-04-27[reference] Fix a typo in 3.4 WhitespaceMatt Brubeck-1/+1
2015-04-27reference: add missing bracketTshepang Lekhonkhobe-2/+2
Also, remove the other brackets, because they make the whole sentence look awkward.
2015-04-27Rollup merge of #24867 - tshepang:patch-3, r=steveklabnikSteve Klabnik-1/+1
2015-04-27reference: block-comment -> block commentTshepang Lekhonkhobe-1/+1
2015-04-27Update reference.md: floating-point sectionDiggory Hardy-2/+10
Clarify type inference of floating-point literals
2015-04-27Update reference.md: string literals sectionDiggory Hardy-6/+6
Remove the name "multi-line string literal" since the rule appears to affect each line-break individually rather than the whole string literal. Re-word, and remove the stray reference to raw strings.
2015-04-26Reference audit: comments and whitespace sectionsRobin Kruppe-9/+12
2015-04-25Redo PR #24811 properlyRobin Kruppe-16/+2
Transplant the grammar-related changes to grammar.md, and remove all grammar talk from reference.md
2015-04-25Rollup merge of #24811 - rkruppe:reference-audit, r=steveklabnikManish Goregaokar-5/+5
Mention `non_ascii_idents` feature gate and remove unused productions. r? @steveklabnik
2015-04-25Rollup merge of #24809 - conradkleinespel:master, r=ManishearthManish Goregaokar-2/+2
The reference has broken links. This should fix it.
2015-04-25Audit reference manual: 3.2 Special unicode productionsRobin Kruppe-5/+5
Mention non_ascii_idents feature gate and remove unused productions
2015-04-25fix compiler plugins path in doc/reference.mdConrad Kleinespel-2/+2
2015-04-24Reference manual 3.5.2.3.1Skyler-4/+5
The description of the syntax for single byte literals is missing the preceding `b` distinction.
2015-04-24More small syntax changes in reference.mdMichael Rosenberg-2/+2
2015-04-24Rollup merge of #24775 - mbrubeck:reference, r=steveklabnikSteve Klabnik-4/+4
Update 7.2.20 (`for` expressions): * `for` loops now use `IntoIterator` instead of just `Iterator` * Simplify the example by removing unnecessary `Vec::iter` call. ...and a fix for a minor formatting error. r? @steveklabnik
2015-04-24Rollup merge of #24766 - nwin:patch-1, r=steveklabnikSteve Klabnik-1/+1
Changed in #22838. audited (raw) byte string literals @ #16676
2015-04-24Remove keywords from reference because they're already in grammarmdinger-25/+0
2015-04-24Remove ebnf from referencemdinger-308/+8
2015-04-24[reference] Update 7.2.20: For expressions.Matt Brubeck-3/+3
* `for` loops now use `IntoIterator` instead of just `Iterator` * Simplify the example by removing unnecessary `Vec::iter` call.
2015-04-24[reference] Fix missing formatting.Matt Brubeck-1/+1
2015-04-24Auto merge of #24744 - bluss:reference-1, r=steveklabnikbors-49/+30
Audit & Edit Chapter 8.1 Types in reference manual - Remove mention of unit type - Update closure types and reference types sections - Fix minor typos
2015-04-24reference: Audit & Edit chapter 8.1 Types.Ulrik Sverdrup-49/+30
- Remove mention of unit type - Update closure types and reference types sections - Fix minor typos
2015-04-24Rollup merge of #24727 - rkruppe:reference-audit, r=steveklabnikManish Goregaokar-10/+25
It was in pretty good shape, but since that is my pet peeve, I clarified the compiler/interpreter distinction and why it is irrelevant for this section. Otherwise only a couple of minor clarifications, and weasel words where reality is more complicated than the text accounted for (e.g., there is more than one kind of library). r? @steveklabnik
2015-04-24Rollup merge of #24721 - vosen:patch-1, r=steveklabnikManish Goregaokar-1/+1
`us` and `is` were replaced with `usize` and `isize` some time ago. Other than that, 3.5.2.1.5 is correct.
2015-04-24Byte string literals are now fixed-size arraysnwin-1/+1
Changed in #22838. audited (raw) byte string literals @ #16676
2015-04-24fixup #24754Manish Goregaokar-2/+2
2015-04-24Rollup merge of #24754 - iliekturtles:patch-1, r=steveklabnikManish Goregaokar-21/+21
2015-04-24Rollup merge of #24753 - tynopex:patch-1, r=steveklabnikManish Goregaokar-0/+27
Add section for range expressions.