Commit Graph

42480 Commits

Author SHA1 Message Date
Ricardo Martins
06b084fc9f Markdown formatting for error explanations. 2015-05-13 12:12:19 +01:00
bors
dd9dcc1e28 Auto merge of #25024 - nrc:mulit-decor, r=sfackler 2015-05-13 08:31:17 +00:00
bors
fa43387527 Auto merge of #24619 - nrc:rc-coerce, r=nikomatsakis
r? @nikomatsakis (note a few TODOs left in the code where I wasn't sure about stuff).
2015-05-13 06:43:05 +00:00
bors
30a42faa1c Auto merge of #25357 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #25224, #25317, #25321, #25324, #25348
- Failed merges: #25174, #25334, #25341
2015-05-13 04:55:31 +00:00
Steve Klabnik
11f945cd00 Merge branch 'trpl_embedding' into rollup 2015-05-13 00:55:18 -04:00
Steve Klabnik
704fb9c2c9 Merge branch 'doc-fixes' of https://github.com/wheals/rust into rollup 2015-05-13 00:54:55 -04:00
Steve Klabnik
f26a2a6e89 Merge branch 'doc_release_channels' into rollup 2015-05-13 00:53:32 -04:00
Steve Klabnik
dd11c7f047 Rollup merge of #25348 - geofft:trpl-fix-enums, r=steveklabnik
The enums chapter at the moment is ... weird. The examples aren't about enums, they're about structs, and most of the chapter talks about how enums don't support comparison operators by default (which is also true of other compound data types.) I think there was a story here once, but some coherency got lost in refactoring.

There are two preliminary patches here, one to combine the struct and tuple-struct chapters, and one to document unit-like structs, because enum syntax is easier to explain once you have those three. The final patch moves the enum chapter after the struct chapter, and rewrites most of it to talk about enums usefully (including covering matches on enums).

r? @steveklabnik
2015-05-13 00:52:49 -04:00
Steve Klabnik
e8c69e5406 Rollup merge of #25324 - richo:richo-compat, r=huonw
This makes the compatibility matrix render a little nicer on github, and also removes a note about windows support from 0.12 (Which is immaterial now that we're approaching 1.0)
2015-05-13 00:52:49 -04:00
Steve Klabnik
7964d4e512 Rollup merge of #25321 - steveklabnik:second_tutorial, r=alexcrichton
This is a little rough, and it needs squashed and section headers, but i'd like to get some eyes on it sooner rather than later.
2015-05-13 00:52:48 -04:00
Steve Klabnik
fe8a4e3dbf Rollup merge of #25317 - steveklabnik:trpl_drop, r=alexcrichton
r? @alexcrichton
2015-05-13 00:52:48 -04:00
Steve Klabnik
3dee0df025 Rollup merge of #25224 - brson:stddoc, r=steveklabnik
Attempted to organize them in a way more relevant to what newbies
would be interested in hearing.

I am not satisfied by this at all, but by virtue of deleting old links alone I think it is an improvement.

r? @steveklabnik
2015-05-13 00:52:48 -04:00
Nick Cameron
b799cd83cc Remove SNAP comments 2015-05-13 16:37:17 +12:00
Nick Cameron
c544e838de Rebasing 2015-05-13 16:24:49 +12:00
Nick Cameron
103e52b1db Merge branch 'master' into mulit-decor 2015-05-13 15:09:17 +12:00
Nick Cameron
31bb4ab759 Fix binder skipping 2015-05-13 14:57:47 +12:00
Nick Cameron
5d4cce6cec Rebasing 2015-05-13 14:35:53 +12:00
Nick Cameron
db1b14a194 Tests for custom coercions 2015-05-13 14:19:51 +12:00
Nick Cameron
03d4d5f80e Fix a bunch of bugs
* segfault due to not copying drop flag when coercing
* fat pointer casts
* segfault due to not checking drop flag properly
* debuginfo for DST smart pointers
* unreachable code in drop glue
2015-05-13 14:19:51 +12:00
Nick Cameron
7d953538d1 Make Rc DST-compatible 2015-05-13 14:19:51 +12:00
Nick Cameron
843db01bd9 eddyb's changes for DST coercions
+ lots of rebasing
2015-05-13 14:19:51 +12:00
Geoffrey Thomas
f59f41e04c trpl/match: Add an example for matching on enums 2015-05-12 20:21:21 -04:00
Geoffrey Thomas
8d50216e9d trpl/enums: Rewrite 2015-05-12 20:21:21 -04:00
Geoffrey Thomas
797d8e2869 trpl/structs: Document unit-like structs 2015-05-12 20:21:21 -04:00
Geoffrey Thomas
457aed7ca0 trpl: move tuple-structs.md into structs.md 2015-05-12 20:21:19 -04:00
Steve Klabnik
2ba61698cc TRPL: dining philosophers 2015-05-12 19:30:48 -04:00
Steve Klabnik
fc6372ea1f TRPL: Rust inside other languages 2015-05-12 18:26:03 -04:00
bors
c2b30b86df Auto merge of #25340 - Manishearth:rollup, r=Manishearth
- Successful merges: #24996, #25220, #25221, #25267, #25322, #25327, #25329, #25330, #25331, #25335
- Failed merges: #25334
2015-05-12 19:11:44 +00:00
Steve Klabnik
9a3e98be1c TRPL: Drop 2015-05-12 15:10:44 -04:00
Steve Klabnik
0ad15bbc2b TRPL: release channels 2015-05-12 15:09:17 -04:00
Brian Anderson
6ebba71a75 doc: Address feedback 2015-05-12 10:53:57 -07:00
Manish Goregaokar
25815655c0 Rollup merge of #25335 - nikomatsakis:updates-to-reference-manual, r=steveklabnik
I did a read through of the manual. This commit corrects various small points and expands some sections, while avoiding too much detail.

r? @steveklabnik
2015-05-12 22:57:54 +05:30
Manish Goregaokar
398148193b Rollup merge of #25331 - michaelsproul:err-idx-doc-link, r=Manishearth
At the moment, http://doc.rust-lang.org/error-index.html isn't linked to from anywhere (except Reddit). This should allow search engines to find error codes!

I also capitalised "The Standard Library" and neatened a few bits of grammar.

Also fixed: `#[main]` inside one of the error descriptions.
2015-05-12 22:57:53 +05:30
Manish Goregaokar
210f4b9a40 Rollup merge of #25330 - mfs:add-wait-waitpid, r=alexcrichton
r? @alexcrichton
2015-05-12 22:57:53 +05:30
Manish Goregaokar
866991e273 Rollup merge of #25329 - jooert:tests, r=alexcrichton 2015-05-12 22:57:53 +05:30
Manish Goregaokar
78cf0f8edf Rollup merge of #25327 - Ms2ger:copy-ref, r=pnkfelix 2015-05-12 22:57:52 +05:30
Manish Goregaokar
e216057dac Rollup merge of #25322 - frewsxcv:patch-23, r=steveklabnik
`if` can be a statement or also an expression.
2015-05-12 22:57:52 +05:30
Manish Goregaokar
bb15c4762d Rollup merge of #25267 - meqif:explain_e0317, r=alexcrichton
Add diagnostic message for E0317, E0154, E0259 and E0260; part of #24407.

About E0317, I was unsure if I should add an example of what could be wrong, such as `struct i64`, `enum char { A, B }` or `type isize = i64`. I decided against it, since the diagnostic message looks clear enough to me.

What do you think?
2015-05-12 22:57:52 +05:30
Manish Goregaokar
e91d272fbb Rollup merge of #25221 - michal-czardybon:master, r=steveklabnik
I corrected some pretty obvious textual mistakes. One thing requires more attention - the paragraph at line 133 in Ownership. It was confusing, so I changed it, but I am no sure if this is what the author had in mind.
2015-05-12 22:57:52 +05:30
Manish Goregaokar
bea12a9998 Rollup merge of #25220 - brson:doc1, r=steveklabnik 2015-05-12 22:57:52 +05:30
Manish Goregaokar
12dc6eed03 Rollup merge of #24996 - steveklabnik:gh24163, r=aturon
These two traits are commonly confused. As such, explain the difference.

Fixes #24163

r? @aturon
2015-05-12 22:57:51 +05:30
bors
3ca008dcf1 Auto merge of #25316 - brson:installer, r=alexcrichton
Revert an accidental revert.
2015-05-12 17:27:11 +00:00
Richo Healey
6f3701d604 readme: Rework the arch support matrix 2015-05-12 09:31:44 -07:00
Niko Matsakis
393a37ecbd Correct various small points, expand some sections, while avoiding
too much detail.
2015-05-12 12:02:39 -04:00
Shmuale Mark
a22b3270b8 book: typo fixes, wording improvements.
The text in iterators.md wasn't wrong, but it read awkwardly to my ear.
2015-05-12 11:58:07 -04:00
Steve Klabnik
e780fb270c TRPL: Borrow and AsRef
These two traits are commonly confused. As such, explain the difference.

Fixes #24163
2015-05-12 10:53:50 -04:00
bors
2a5a320bab Auto merge of #25300 - kballard:core-slice-overflow, r=Gankro
core::slice was originally written to tolerate overflow (notably, with
slices of zero-sized elements), but it was never updated to use wrapping
arithmetic when overflow traps were added.

Also correctly handle the case of calling .nth() on an Iter with a
zero-sized element type. The iterator was assuming that the pointer
value of the returned reference was meaningful, but that's not true for
zero-sized elements.

Fixes #25016.
2015-05-12 14:39:31 +00:00
bors
0ad202671f Auto merge of #25171 - quantheory:associated_time_long_paths, r=nikomatsakis
It is currently broken to use syntax such as `<T as Foo>::U::static_method()` where `<T as Foo>::U` is an associated type. I was able to fix this and simplify the parser a bit at the same time.

This also fixes the corresponding issue with associated types (#22139), but that's somewhat irrelevant because #22519 is still open, so this syntax still causes an error in type checking.

Similarly, although this fix applies to associated consts, #25046 forbids associated constants from using type parameters or `Self`, while #19559 means that associated types have to always have one of those two. Therefore, I think that you can't use an associated const from an associated type anyway.
2015-05-12 13:04:14 +00:00
Michael Sproul
6faa8d6793 Add a link to the error index to the main doc page.
I also capitalised "The Standard Library" and neatened a few bits of grammar.

Also fixed: `#[main]` inside one of the error descriptions.
2015-05-12 21:21:26 +10:00
bors
67dfc177f3 Auto merge of #25323 - eddyb:coherent-coherence, r=pnkfelix
The loop to load all the known impls from external crates seems to have been used because `ty::populate_implementations_for_trait_if_necessary` wasn't doing its job, and solely relying on it resulted in loading only impls in the same crate as the trait.

Coherence for `librustc` was reduced from 18.310s to 0.610s, from stage1 to stage2.
Interestingly, type checking also went from 46.232s to 42.003s, though that could be noise or unrelated improvements.

On a smaller scale, `fn main() {}` now spends 0.003s in coherence instead of 0.368s, which fixes #22068.
It also peaks at only 1.2MB, instead of 16MB of heap usage.
2015-05-12 10:46:14 +00:00