Commit Graph

42759 Commits

Author SHA1 Message Date
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
Brian Leibig
568d7f1960 Update the bison grammar for various language changes 2015-05-12 09:20:43 -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
Garming Sam
46753dacb1 Record correct span for static mut items 2015-05-13 01:32:12 +12: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
Steve Klabnik
425455b18e Rollup merge of #25292 - steveklabnik:stack_and_heap, r=nikomatsakis
I think someday I'd like to make these drawings rather than text, but for now, this will have to be good enough.
2015-05-11 23:24:19 -04:00
Steve Klabnik
abb97af508 Rollup merge of #25288 - DrKwint:master, r=alexcrichton
The functions BitSet::{iter,union,symmetric_difference} each had docs that claimed u32s were output when their actual output each end up being usizes.

r? @steveklabnik
2015-05-11 23:24:19 -04:00
Steve Klabnik
adf5b84394 Rollup merge of #25283 - steveklabnik:gh24999, r=alexcrichton
and remove references to the unit type, which no longer exists

Fixes #24999
2015-05-11 23:24:19 -04:00
Steve Klabnik
f8df5ea8a7 Rollup merge of #25282 - badboy:reference-macro-1, r=alexcrichton
As mentioned in https://github.com/rust-lang/rust/issues/16676#issuecomment-100676326 this makes it a little bit more correct.

I'm a bit unsure whether or not it should be explained that the transcriber can be wrapped in parentheses or curly braces if necessary.
2015-05-11 23:24:18 -04:00
Steve Klabnik
f4a79c0915 Rollup merge of #25278 - cpjreynolds:path-doc, r=alexcrichton
Change from "must be used with behind a pointer" to "must be used behind a pointer"
2015-05-11 23:24:18 -04:00
Steve Klabnik
5f2482acf1 Rollup merge of #25272 - nham:copy_long_diag, r=alexcrichton
Adds long diagnostic messages for:

 - E0184
 - E0204
 - E0205
 - E0206
 - E0243
 - E0244
 - E0249
 - E0250

This PR also adds some comments to the error codes in `librustc_typeck/diagnostics.rs`.

cc #24407
2015-05-11 23:24:18 -04:00
Steve Klabnik
30b527156b Rollup merge of #25254 - cgaebel:check-sizes-on-allocate, r=Gankro
They're only enabled in debug builds, but a panic is usually more
welcome than UB in debug builds.

Previous review at https://github.com/rust-lang/rust/pull/22069

r? @Gankro
cc @huon
2015-05-11 23:24:18 -04:00
Nick Cameron
edb2ee510b Tests 2015-05-12 14:20:35 +12:00
Nick Cameron
5d16772ecb Rebasing 2015-05-12 14:15:02 +12:00
Nick Cameron
e0216fcc42 Merge branch 'master' into 2015-05-12 12:48:14 +12:00
Nick Cameron
0d258516cb Proper spans for for loop expansion 2015-05-12 12:43:40 +12:00
Steve Klabnik
42240dccb6 static method -> associated function 2015-05-11 18:22:49 -04:00
Brian Anderson
f6119f18d2 Update rust-installer 2015-05-11 15:05:57 -07:00
Steve Klabnik
e66653bee5 TRPL: the stack and the heap 2015-05-11 16:18:12 -04:00
bors
4b88e8f63e Auto merge of #25225 - bluss:doc-search-assoc-items, r=alexcrichton
Rustdoc fixes for associated items

This is related to isssue #22442 and solves it partly.

This solves the search index links of associated types and constants,
so that they link to the trait page.

Also add an Associated Constants section if constants are present.
2015-05-11 20:02:18 +00:00