Commit Graph

42448 Commits

Author SHA1 Message Date
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
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
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
Johannes Oertel
23300a39a1 Add regression test for #20413
Closes #20413.
2015-05-12 12:24:20 +02:00
Johannes Oertel
1d1570acc9 Add regression test for #18075
Closes #18075.
2015-05-12 12:23:19 +02:00
Mike Sampson
a5cac55be4 Add wait and waitpid to libc. 2015-05-12 19:57:09 +10:00
bors
feac9f1c7b Auto merge of #24818 - tbelaire:double-import, r=nrc
This isn't quite right, but it's interesting.
2015-05-12 08:54:40 +00:00
Ms2ger
93c21c7bca Correct claims about &T's Copyness. 2015-05-12 10:52:36 +02:00
bors
f2e1a1b50e Auto merge of #23424 - arielb1:ambiguous-project, r=nikomatsakis
r? @nikomatsakis
2015-05-12 07:02:40 +00:00
Eduard Burtescu
75cd8f94e1 rustc_typeck: remove the "preload all impls ever" workaround in coherence. 2015-05-12 07:58:01 +03:00
Eduard Burtescu
592165fb17 Fix ty::populate_implementations_for_trait_if_necessary to load the trait's impls from all the crates. 2015-05-12 07:56:37 +03:00
Eduard Burtescu
aeb92bab5d rustc: rename ty::populate_implementations_for_type_if_necessary to make it clear that it only populates inherent impls. 2015-05-12 07:51:15 +03:00
Eduard Burtescu
8bcb3cb475 rustc::metadata: use u64 for DefId's instead of strings. 2015-05-12 07:49:15 +03:00
Corey Farwell
d13f765be8 Make mention of if more generic
`if` can be a statement or also an expression.
2015-05-12 00:33:22 -04:00
bors
a90453a178 Auto merge of #25320 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #25254, #25272, #25278, #25282, #25283, #25288, #25292, #25302, #25304, #25314
- Failed merges:
2015-05-12 04:17:30 +00:00
Steve Klabnik
28b923c477 Rollup merge of #25314 - steveklabnik:static_to_associated, r=alexcrichton 2015-05-11 23:24:20 -04:00
Steve Klabnik
f3849431a9 Rollup merge of #25304 - oli-obk:patch-2, r=steveklabnik 2015-05-11 23:24:20 -04:00
Steve Klabnik
7f79f14959 Rollup merge of #25302 - michaelsproul:error-markdown, r=pnkfelix
A few errors slipped through my filter. Markdown formatting is especially important now that http://doc.rust-lang.org/error-index.html is live!

Speaking of, the error index should probably be linked to from somewhere. It doesn't quite fit under any of the sections in the index, but I could create a new one for it? Or add it under "tools" despite it not exactly being an executable tool.
2015-05-11 23:24:19 -04:00