Steve Klabnik
c7279b4214
Rollup merge of #24775 - mbrubeck:reference, r=steveklabnik
...
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-24 22:54:27 -04:00
Steve Klabnik
120065e7f2
Rollup merge of #24766 - nwin:patch-1, r=steveklabnik
...
Changed in #22838 .
audited (raw) byte string literals @ #16676
2015-04-24 22:54:26 -04:00
Steve Klabnik
c632bdc67a
Rollup merge of #24736 - steveklabnik:doc_mutability, r=alexcrichton
...
Okay, last chapter other than ownership stuff. 🎊
2015-04-24 22:54:25 -04:00
Steve Klabnik
3c6c16e00f
Rollup merge of #24729 - mdinger:reference_grammar, r=steveklabnik
...
From https://github.com/rust-lang/rust/issues/24723#issuecomment-95636827 :
> Yes, I've been meaning to just remove it in favor of GRAMMAR.md
> - steveklabnik
2015-04-24 22:54:25 -04:00
Steve Klabnik
02194bc772
Rollup merge of #24725 - steveklabnik:doc_operators_and_overloading, r=alexcrichton
...
I forgot these heavily use associated types, so move it after that
as well.
2015-04-24 22:54:25 -04:00
Steve Klabnik
831232b767
Rollup merge of #24722 - steveklabnik:doc_deref, r=alexcrichton
...
r? @alexcrichton
2015-04-24 22:54:24 -04:00
Steve Klabnik
d70a994536
TRPL: deref coercions
2015-04-24 18:39:31 -04:00
Steve Klabnik
e715205606
TRPL: mutability
2015-04-24 17:57:16 -04:00
Steve Klabnik
b24271ee9d
TRPL: operators and overloading
...
I forgot these heavily use associated types, so move it after that
as well.
2015-04-24 17:27:49 -04:00
Johannes Oertel
07cc7d9960
Change name of unit test sub-module to "tests".
...
Changes the style guidelines regarding unit tests to recommend using a
sub-module named "tests" instead of "test" for unit tests as "test"
might clash with imports of libtest.
2015-04-24 23:06:41 +02:00
mdinger
7089c5e79c
Remove keywords from reference because they're already in grammar
2015-04-24 16:50:23 -04:00
mdinger
9ecfdada2b
Updates to grammar
2015-04-24 16:50:23 -04:00
mdinger
8cf255268c
Remove ebnf from reference
2015-04-24 16:50:22 -04:00
Matt Brubeck
331821e3a0
[reference] Update 7.2.20: For expressions.
...
* `for` loops now use `IntoIterator` instead of just `Iterator`
* Simplify the example by removing unnecessary `Vec::iter` call.
2015-04-24 09:24:53 -07:00
Matt Brubeck
7972fbb735
[reference] Fix missing formatting.
2015-04-24 09:24:53 -07:00
bors
714bd493c7
Auto merge of #24744 - bluss:reference-1, r=steveklabnik
...
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-24 15:48:35 +00:00
Ulrik Sverdrup
b22ea2db9c
reference: Audit & Edit chapter 8.1 Types.
...
- Remove mention of unit type
- Update closure types and reference types sections
- Fix minor typos
2015-04-24 16:55:57 +02:00
Manish Goregaokar
1447ee4c20
Rollup merge of #24727 - rkruppe:reference-audit, r=steveklabnik
...
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-24 19:21:14 +05:30
Manish Goregaokar
0c1df5dadf
Rollup merge of #24721 - vosen:patch-1, r=steveklabnik
...
`us` and `is` were replaced with `usize` and `isize` some time ago. Other than that, 3.5.2.1.5 is correct.
2015-04-24 19:21:14 +05:30
Manish Goregaokar
7a50ecdd72
Rollup merge of #24698 - steveklabnik:remove_debug_display, r=steveklabnik
...
this is too small for its own thing, I think.
2015-04-24 19:21:13 +05:30
nwin
38c3b62e83
Byte string literals are now fixed-size arrays
...
Changed in #22838 .
audited (raw) byte string literals @ #16676
2015-04-24 11:12:53 +02:00
Manish Goregaokar
131b5aca5a
fixup #24754
2015-04-24 10:38:07 +05:30
Manish Goregaokar
a33b5d3460
Rollup merge of #24754 - iliekturtles:patch-1, r=steveklabnik
2015-04-24 09:50:16 +05:30
Manish Goregaokar
53d6b38c21
Rollup merge of #24753 - tynopex:patch-1, r=steveklabnik
...
Add section for range expressions.
2015-04-24 09:49:59 +05:30
Manish Goregaokar
f91216bdc2
Rollup merge of #24752 - doomrobo:patch-1, r=steveklabnik
...
Updated sample code to updated syntax (now compiles). Also tweaked the text to reflect the change.
2015-04-24 09:49:44 +05:30
Manish Goregaokar
76dd69183f
Rollup merge of #24750 - withoutboats:patch-1, r=steveklabnik
...
1) Moved 'while' section below 'loop', 'break', and 'continue'; 2) Added information to 'while' and 'for' loops that they interact with 'break' and 'continue' and may have a lifetime label. 3) Clarified labeling syntax on the infinite loops.
2015-04-24 09:49:27 +05:30
Manish Goregaokar
7e3bb03429
Rollup merge of #24743 - geofft:trpl-macros-links, r=steveklabnik
...
r? @steveklabnik
2015-04-24 09:49:12 +05:30
Manish Goregaokar
292a25f755
Rollup merge of #24742 - mbrubeck:keywords, r=steveklabnik
...
* Add two missing keywords, `Self` and `proc`
* Fix some mis-alphabetized keywords
r? @steveklabnik
2015-04-24 09:48:50 +05:30
Manish Goregaokar
9863f2c4f3
Rollup merge of #24740 - mbrubeck:reference, r=steveklabnik
...
r? @steveklabnik
2015-04-24 09:48:33 +05:30
Manish Goregaokar
cda00831e3
Rollup merge of #24734 - vadimcn:patch-1, r=alexcrichton
...
'win32' -> 'windows', added 'ios'
2015-04-24 09:47:58 +05:30
Sean Patrick Santos
b1db4ec3d0
Feature-gate associated constants.
2015-04-23 21:02:29 -06:00
Mike Boutin
4c2274e1ab
Fix spelling errors.
2015-04-23 20:49:27 -04:00
tynopex
4db0efb45c
Update reference.md
...
Add section for range expressions.
2015-04-23 20:38:11 -04:00
Michael Rosenberg
352838ed34
Update "Generic Functions" section
...
Updated sample code to updated syntax (now compiles). Also tweaked the text to reflect the change.
2015-04-23 20:33:46 -04:00
Lee Aronson
3ae6a5e48d
Fixed typo
2015-04-23 16:50:05 -07:00
Lee Aronson
da5f80cc6d
Improve information about loops
...
1) Moved 'while' section below 'loop', 'break', and 'continue'; 2) Added information to 'while' and 'for' loops that they interact with 'break' and 'continue' and may have a lifetime label. 3) Clarified labeling syntax on the infinite loops.
2015-04-23 16:46:33 -07:00
Matt Brubeck
4cab21c003
Also mention /*!
doc comments.
2015-04-23 14:26:07 -07:00
Geoffrey Thomas
2f491228c0
TRPL: Remove references to "advanced macros chapter"
...
This was merged back into the regular macros chapter, but a few
references lingered and caused broken links.
2015-04-23 17:17:14 -04:00
Matt Brubeck
17390a1a79
Update and organize the Keywords table
...
* Add two missing keywords, `Self` and `proc`
* Fix some mis-alphabetized keywords
2015-04-23 14:15:42 -07:00
Geoffrey Thomas
ad2684c41c
TRPL: Fix link to macro section of reference
2015-04-23 17:08:19 -04:00
Matt Brubeck
1b878379e9
Clarify that //! comments are also doc comments.
2015-04-23 14:03:25 -07:00
Vadim Chugunov
58b3b8bcfa
Update supported values of target_os
...
'win32' -> 'windows', added 'ios'
2015-04-23 12:32:25 -07:00
nwin
99fd7f2131
typo 2
2015-04-23 21:26:34 +02:00
nwin
a8f5989afb
typo
2015-04-23 21:25:09 +02:00
nwin
efb457b8cf
object type -> trait object
...
Consistency. The book also refers to it as trait objects.
2015-04-23 21:23:35 +02:00
Robin Kruppe
e9f298082e
Reference audit: section 5 (Crates and source files)
2015-04-23 19:06:09 +02:00
Andrzej Janik
5efdbecdf9
Stop mentioning obsolete integer suffixes
...
`us` and `is` were replaced with `usize` and `isize` some time ago.
2015-04-23 16:39:18 +02:00
bors
1114fcd945
Auto merge of #24664 - steveklabnik:doc_ufcs, r=alexcrichton
...
AKA, two four-letter acronyms 😉
This feels a bit light, if there's other things I should add, let me know.
2015-04-23 12:04:01 +00:00
Manish Goregaokar
b0319e9094
fix doctest
2015-04-23 04:56:00 +05:30
Steve Klabnik
b97b0e3929
TRPL: UFCS
...
AKA, two four-letter acronyms 😉
2015-04-22 18:30:27 -04:00
Manish Goregaokar
bd8101d698
Rollup merge of #24675 - steveklabnik:two_more_chapters, r=alexcrichton
...
Two more chapters of TRPL. The `type` one is pretty straightforward, but I wasn't really sure what to put for unsized types. I just explained the very basics, and the special bounds syntax. Thoughts on what else should go here?
r? @alexcrichton
2015-04-23 03:21:02 +05:30
Manish Goregaokar
231cb9361c
Rollup merge of #24673 - steveklabnik:doc_attributes, r=alexcrichton
...
r? @alexcrichton
2015-04-23 03:21:02 +05:30
Steve Klabnik
a9bc39c536
remove debug and display chapter
...
this is too small for its own thing, I think.
2015-04-22 16:41:22 -04:00
Steve Klabnik
defdc4418a
TRPL: type aliases and unsized types
2015-04-22 13:27:13 -04:00
Steve Klabnik
a5ae4cc19d
TRPL: attributes & conditional compilation
2015-04-22 11:27:31 -04:00
bors
50cd2e84d5
Auto merge of #24671 - steveklabnik:doc_const_static, r=alexcrichton
...
r? @alexcrichton
2015-04-22 06:37:57 +00:00
Steve Klabnik
a04f6c5293
TRPL: const and static
2015-04-21 19:47:07 -04:00
Alex Crichton
a1dd5ac787
rollup merge of #24636 : alexcrichton/remove-deprecated
...
Conflicts:
src/libcore/result.rs
2015-04-21 15:28:53 -07:00
Alex Crichton
a568a7f9f2
std: Bring back f32::from_str_radix as an unstable API
...
This API was exercised in a few tests and mirrors the `from_str_radix`
functionality of the integer types.
2015-04-21 15:23:54 -07:00
Alex Crichton
44338cb944
rollup merge of #24672 : steveklabnik/edit_tuple_structs
...
I thought I edited all the last little chapters, but I missed this one.
r? @alexcrichton
2015-04-21 15:23:18 -07:00
Alex Crichton
0feaf6154c
rollup merge of #24669 : steveklabnik/fix
...
This section was added but the list wasn't updated.
2015-04-21 15:23:17 -07:00
Alex Crichton
83008b2e9b
rollup merge of #24667 : steveklabnik/more_editing
...
r? @alexcrichton
2015-04-21 15:23:16 -07:00
Alex Crichton
1a6c18d660
rollup merge of #24665 : sw17ch/document-complete-slice-syntax
...
The documentation doesn't appear to describe the `&foo[..]` syntax.
I tried looking in `primitive-types.html#slices` and `std/primitive.slice.html`.
There's an example of partially slicing an array in trpl and a mention of `&foo[..]` in [the standard library documentation](https://doc.rust-lang.org/std/primitive.slice.html ), but neither place, from what I can see, actually describes the behavior of `&foo[..]`.
+r? @steveklabnik
2015-04-21 15:23:15 -07:00
Alex Crichton
ee9d4eefba
rollup merge of #24663 : steveklabnik/gh24639
...
Fixes #24639
2015-04-21 15:23:14 -07:00
Alex Crichton
251f8d3fbd
rollup merge of #24654 : mdinger/patch-2
...
This just fixes some comments made on https://github.com/rust-lang/rust/pull/24632 . The second I think is better unless @steveklabnik actually meant something else.
2015-04-21 15:23:12 -07:00
Steve Klabnik
f78ee1aff1
Document functional update syntax
...
Fixes #24639
2015-04-21 16:18:51 -04:00
Steve Klabnik
b0105b5a59
TRPL editing: tuple structs
2015-04-21 15:25:43 -04:00
Steve Klabnik
f0a3b6c509
Add research to README of TRPL
...
This section was added but the list wasn't updated.
2015-04-21 13:49:23 -04:00
Steve Klabnik
0070625495
small edits for recently written book chapters
2015-04-21 13:17:43 -04:00
John Van Enk
5f7556cd39
Add an example of completely slicing an object.
2015-04-21 09:21:52 -07:00
Steve Klabnik
9cc0af8d69
Refocus unsafe code chapter on unsafe itself.
2015-04-21 08:28:06 -04:00
mdinger
dc596695c9
Fix typos
2015-04-21 01:05:26 -04:00
Steve Klabnik
9ddcc38b6e
Refocus unsafe code chapter on unsafe itself.
2015-04-20 21:17:46 -04:00
Steve Klabnik
1d082de2d9
Rollup merge of #24643 - steveklabnik:doc_if_let, r=jakub-
...
and while let
2015-04-20 21:15:54 -04:00
Steve Klabnik
52ec8bdf73
Rollup merge of #24632 - steveklabnik:casting_guide, r=alexcrichton
...
Due to documenting `transmute`, addresses part of #12905
2015-04-20 21:15:54 -04:00
Steve Klabnik
9f87362308
Rollup merge of #24631 - steveklabnik:unsafe_guide, r=alexcrichton
...
Many unsafe features are now in the unstable section, so this section is
really just about raw pointers now. That also makes sense for its place
in the TOC.
This addresses part of #12905 .
2015-04-20 21:15:54 -04:00
Steve Klabnik
05ee6f0709
Rollup merge of #24630 - steveklabnik:quickfix, r=alexcrichton
2015-04-20 21:15:53 -04:00
Steve Klabnik
81b603e7a5
Rollup merge of #24577 - steveklabnik:gh24573, r=alexcrichton
...
Fixes #24573
2015-04-20 21:15:52 -04:00
Steve Klabnik
ff12b7b308
Rollup merge of #24571 - steveklabnik:editing, r=alexcrichton
...
A bunch of chapters, fixes an issue or two as well.
r? @alexcrichton
2015-04-20 21:15:52 -04:00
Steve Klabnik
de13f95f21
Rollup merge of #24516 - steveklabnik:gh22621, r=alexcrichton
...
Fixes #22621
2015-04-20 21:15:52 -04:00
Steve Klabnik
570b250b8f
TRPL: if let
...
and while let
2015-04-20 19:48:24 -04:00
Steve Klabnik
1e29abec59
Add common macros to TRPL
...
Fixes #22621
2015-04-20 14:40:54 -04:00
Steve Klabnik
1150fb0f88
TRPL: unsafe -> raw pointers
...
Many unsafe features are now in the unstable section, so this section is
really just about raw pointers now. That also makes sense for its place
in the TOC.
This addresses part of #12905 .
2015-04-20 13:38:05 -04:00
Steve Klabnik
0f20c9d8b7
Remove feature gated examples from the reference.
...
The slice patterns example was nice, so let's put it with the other
slice pattern feature gate documentation.
Fixes #24573
2015-04-20 13:33:57 -04:00
Steve Klabnik
9a65045611
TRPL: casting
...
Due to documenting `transmute`, addresses part of #12905
2015-04-20 11:55:29 -04:00
Steve Klabnik
fbd3261e37
Fix small typo in TRPL intro
2015-04-20 10:42:17 -04:00
Steve Klabnik
14af25797f
TRPL edits: generics
2015-04-20 09:44:21 -04:00
Steve Klabnik
1c48227b3c
Remove inverse example from generics part of TRPL
...
Fixes #24325 .
2015-04-20 09:44:21 -04:00
Steve Klabnik
e289b689d4
TRPL edits: traits
...
Let's talk about generics first, since we use traits to bound them
in funtions.
Partially addresses #24325
Fixes #24271
2015-04-20 09:44:10 -04:00
Steve Klabnik
1646ebd5ba
move Deref coercions to syntax and semantics
...
It's a language feature, so it belongs here.
2015-04-20 09:37:49 -04:00
Steve Klabnik
5b54a4f03b
TRPL copyedits: strings
2015-04-20 09:37:49 -04:00
Steve Klabnik
73d3d68550
TRPL editing: vectors
2015-04-20 09:37:49 -04:00
Steve Klabnik
a3a2049166
Move drop back in TRPL TOC
...
It's a trait implementation, so we need traits first.
2015-04-20 09:37:49 -04:00
Steve Klabnik
f81b1fcf8c
TRPL edits: method syntax
2015-04-20 09:37:49 -04:00
Steve Klabnik
7f43c5782c
TRPL editing: structs
2015-04-20 09:37:48 -04:00
Steve Klabnik
44db46a308
TRPL editing: move patterns back
...
We want to talk about how to pattern match on structs, so let's bump
it back one.
2015-04-20 09:37:48 -04:00
Steve Klabnik
9661efac8b
TRPL editing: patterns
...
Partially addresses #24388
2015-04-20 09:37:48 -04:00
Steve Klabnik
836c8a826b
TRPL editing: match
2015-04-20 09:37:46 -04:00
Steve Klabnik
213708867e
TRPL editing: enums
...
Now that we're not doing the guessing game, a lot of this is irrelevant.
2015-04-20 09:37:45 -04:00
bors
ddf25c890d
Auto merge of #24572 - steveklabnik:gh24569, r=brson
...
Fixes #24569 .
Should wait until https://github.com/rust-lang/rust-www/pull/114 is merged.
2015-04-19 15:24:19 +00:00