Commit Graph

41974 Commits

Author SHA1 Message Date
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
c43ecb513a Rollup merge of #24662 - steveklabnik:gh24656, r=steveklabnik
Fixes #24656 

r? @pnkfelix 

I just added the examples, but if the wording needs expanded too, let me know what you think should be added :)
2015-04-24 22:54:24 -04:00
Rory O’Kane
4ade7080c3 In [-] doc buttons, change hyphen ‘-’ to minus ‘−’
The minus sign ‘−’ is the same width as the plus sign ‘+’, so the button’s transition between the two symbols will look more smooth.
2015-04-24 20:29:28 -04:00
Steve Klabnik
064972c297 Whoops, please tidy 2015-04-24 18:59:47 -04:00
Liigo Zhuang
31c3e7ed78 rustdoc: change color of trait types
Fixes #24441
2015-04-25 06:57:18 +08:00
Steve Klabnik
d70a994536 TRPL: deref coercions 2015-04-24 18:39:31 -04:00
Steve Klabnik
eb5b842145 Add examples by @pnkfelix to fmt precision
Fixes #24656
2015-04-24 18:24:06 -04:00
Johannes Oertel
7151529f73 rustbook: Fixes display of navigation links in README.html. 2015-04-25 00:21:13 +02: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
bors
f9e53c7f2c Auto merge of #24553 - nikomatsakis:issue-22779-overconstrained-impl, r=pnkfelix
Rather than storing the relations between free-regions in a global
table, introduce a `FreeRegionMap` data structure. regionck computes the
`FreeRegionMap` for each fn and stores the result into the tcx so that
borrowck can use it (this could perhaps be refactored to have borrowck
recompute the map, but it's a bid tedious to recompute due to the
interaction of closures and free fns). The main reason to do this is
because of #22779 -- using a global table was incorrect because when
validating impl method signatures, we want to use the free region
relationships from the *trait*, not the impl.

Fixes #22779.
2015-04-24 21:07:41 +00: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
Niko Matsakis
55ffd2e986 fix rustc_driver tests 2015-04-24 16:55:19 -04: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
Sean Bowe
be1117113f Split up tests, reduce coverage 2015-04-24 12:34:27 -06:00
bors
2214860d4a Auto merge of #24594 - doomsplayer:patch-2, r=alexcrichton
why use dummy implementation on linux?
2015-04-24 17:49:46 +00:00
Steven Allen
e129b92c40 Deduplicate slice iter offset/transmute code. 2015-04-24 12:55:19 -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
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