Commit Graph

41802 Commits

Author SHA1 Message Date
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
Steve Klabnik 15c3435b87 Remove reference to 'to'
FIxes #24712
2015-04-24 11:02:07 -04: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
bors f191f92421 Auto merge of #24758 - Manishearth:rollup, r=Manishearth
- Successful merges: #24523, #24698, #24699, #24700, #24706, #24717, #24718, #24721, #24727
- Failed merges:
2015-04-24 13:50:40 +00: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 af6ec32842 Rollup merge of #24717 - liigo:add-back-toggle-links, r=alexcrichton
r? @alexcrichton (since you added `.stability` warning messages)
2015-04-24 19:21:14 +05:30
Manish Goregaokar f1db259804 Rollup merge of #24706 - tamird:remove-DST-comment, r=alexcrichton
`ToCStr` was removed with `old_io` and the current method `as_os_str`
is inherent to `Path`, meaning there is no suitable trait bound that
could be used here.

r? @alexcrichton
2015-04-24 19:21:14 +05:30
Manish Goregaokar fb0f344ae2 Rollup merge of #24700 - rkruppe:doc-typos, r=alexcrichton
r? @steveklabnik
2015-04-24 19:21:13 +05:30
Manish Goregaokar b5fddf9b19 Rollup merge of #24699 - mbrubeck:doc-edit, r=steveklabnik
r? @steveklabnik
2015-04-24 19:21:13 +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
Manish Goregaokar 50833a3f83 Rollup merge of #24523 - GuillaumeGomez:clean-error-codes, r=Manishearth 2015-04-24 19:21:12 +05:30
Skyler b179f2b984 Reference manual 3.5.2.1.5
`is` and `us` suffixes are deprecated in favor of `isize` and `usize`.
2015-04-24 04:35:29 -07:00
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
Felix S. Klock II b0a4808757 Remove direct variant-dispatch entirely from trans_struct_drop.
This addresses to-do in my code, and simplifies this method a lot to boot.

(The necessary enum dispatch has now effectively been shifted entirely
into the scheduled cleanup code for the enum contents.)
2015-04-24 09:39:15 +02:00
Felix S. Klock II d5acb55c59 regression test. 2015-04-24 09:39:15 +02:00
Felix S. Klock II 8f987956b4 Added new kind of drop-glue that just drops the type's contents,
without invoking the Drop::drop implementation.

This is necessary for dealing with an enum that switches own `self` to
a different variant while running its destructor.

Fix #23611.
2015-04-24 09:38:55 +02:00
Felix S. Klock II f7d9b43972 Latent bug in iter_structural_ty: handle `_match::Single` on zero-variant enum.
(This may not be the *best* fix, compared to e.g. returning
`_match::NoBranch` from `trans_switch` on a zero-variant enum. But it
is one of the *simplest* fixes available.)
2015-04-24 09:38:55 +02:00
bors 9d439b4177 Auto merge of #24759 - Manishearth:rollup2, r=Manishearth
r? @Manishearth
2015-04-24 05:09:31 +00: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 5a61d43526 Rollup merge of #24739 - nrc:span-item, r=huonw
(And other kinds of items).

This brings trait/impl items in line with top-level items in this respect. It means we don't get the attributes when showing error messages for methods, etc. (a good thing, I think). Since attributes have spans it is still easy to create a span for the item + all attributes.
2015-04-24 09:48:18 +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
Manish Goregaokar be26031672 Rollup merge of #24733 - nwin:patch-1, r=steveklabnik
Consistency. The book also refers to it as trait objects.
2015-04-24 09:47:43 +05:30
Sean Patrick Santos b1db4ec3d0 Feature-gate associated constants. 2015-04-23 21:02:29 -06:00
Sean Patrick Santos 29eb550ee6 Get associated consts working in match patterns. 2015-04-23 21:02:29 -06:00
Sean Patrick Santos 91ae5e31ab Fix dead code check for associated const impls. 2015-04-23 21:02:28 -06:00
Sean Patrick Santos 7f78887547 Add previously omitted associated const tests. 2015-04-23 21:02:27 -06:00
Sean Patrick Santos 3d9b5d0424 Fix a number of bugs that interfered with cross-crate usage of associated consts. 2015-04-23 21:02:27 -06:00
Sean Patrick Santos 7129e8815e Functional changes for associated constants. Cross-crate usage of associated constants is not yet working. 2015-04-23 21:02:26 -06:00
Sean Patrick Santos b5499775d6 Structural changes for associated constants
Introduces new variants and types in syntax::ast, middle::ty, and middle::def.
2015-04-23 21:02:25 -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
Luke Gallagher f1b40d733e Remove duplicate feature gate tests
As part of the audit for #22820 the following duplicate feature
gate tests were removed:

* `box_patterns`
* `simd_ffi`

These tests for `box_patterns` and `simd_ffi` were added in #23578,
however there were existing tests in #20723 and #21233 respectively.
2015-04-24 10:16:59 +10:00
Luke Gallagher 0cae31513b Add feature gate tests
As part of the audit for #22820 the following feature gate tests have
been added:

* `rustc_diagnostic_macros`

/cc #19624
2015-04-24 10:10:48 +10:00
Luke Gallagher 03ff28135c Add feature gate tests
As part of the audit for #22820 the following feature gate tests have
been added:

* `negate_unsigned`
* `on_unimplemented`
* `optin_builtin_traits`
* `plugin`
* `rustc_attrs`
* `slice_patterns`
2015-04-24 10:10:48 +10:00
Luke Gallagher 12e30f7f06 Add ')' in `advaced_slice_patterns` error message 2015-04-24 10:10:48 +10:00
Luke Gallagher e0b4c379c4 Add missing '\' for `custom_derive` error message 2015-04-24 10:10:48 +10: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
bors 21f278a687 Auto merge of #24633 - rapha:master, r=alexcrichton 2015-04-23 23:44:40 +00:00