Commit Graph

42527 Commits

Author SHA1 Message Date
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
Kevin Ballard
f2614f5858 Avoid returning a slice with a null pointer from Iter.as_slice()
core::slice::Iter.ptr can be null when iterating a slice of zero-sized
elements, but the pointer value used for the slice itself cannot. Handle
this case by always returning a dummy pointer for slices of zero-sized
elements.
2015-05-11 12:37:31 -07:00
Kevin Ballard
e1e34e9275 Reintroduce non-null assumptions in core::slice iterators
The previous assumptions were not valid for slices of zero-sized
elements.
2015-05-11 11:58:45 -07:00
bors
a90dd32949 Auto merge of #25196 - brson:relnotes, r=alexcrichton
cc @aturon
2015-05-11 18:13:11 +00:00
Brian Anderson
94caeb326c More authors updates 2015-05-11 10:59:23 -07:00
Steve Klabnik
dd7d0f5e9c Fix links in the referece
and remove references to the unit type, which no longer exists

Fixes #24999
2015-05-11 12:49:17 -04:00
bors
0a41c4a33d Auto merge of #25301 - jooert:vec_map_fix_split_off, r=Gankro
We don't need to copy any elements if `at` is behind the last element
in the map. The last element is at index `self.v.len() - 1`, so we
should not copy if `at` is greater **or equals** `self.v.len()`.

r? @Gankro
2015-05-11 16:20:49 +00:00
Oliver Schneider
7dd7bea3ac trpl: item macros must be followed by a semicolon 2015-05-11 16:46:24 +02:00
bors
f697041b37 Auto merge of #25303 - Manishearth:rollup, r=Manishearth
- Successful merges: #25280, #25284, #25286, #25287, #25290, #25291, #25297
- Failed merges:
2015-05-11 14:30:08 +00:00
Manish Goregaokar
2b0191e6d5 Rollup merge of #25297 - carols10cents:grammar-todos, r=steveklabnik
Hiiii, I've got another chunk of updates to the grammar documentation!  🌟 🌠 

Chipping away at #22445, still have some more to go. I'm learning so much!!!
2015-05-11 19:58:58 +05:30
Manish Goregaokar
dec422541b Rollup merge of #25291 - johannhof:let-expressions-example, r=steveklabnik
Maybe it's me, but I really needed an example to understand if let and refutable statements.
Playpen: http://is.gd/mjX3Gf

Let me know if the variable names are too, uh, culinary.
2015-05-11 19:58:57 +05:30
Manish Goregaokar
f2c2736cd8 Rollup merge of #25290 - bluss:docfixes, r=steveklabnik
Several Minor API / Reference Documentation Fixes

- Fix a few small errors in the reference.
- Fix paper cuts in the API docs.

Fixes #24882
Fixes #25233
Fixes #25250
2015-05-11 19:58:57 +05:30
Manish Goregaokar
8f01d8d7c2 Rollup merge of #25287 - petehunt:patch-2, r=steveklabnik 2015-05-11 19:58:57 +05:30
Manish Goregaokar
1b8f52bb69 Rollup merge of #25286 - johannhof:patch-1, r=steveklabnik
The reference was claiming all vectors all bounds-checked at run-time, when constant vectors are usually checked at compile-time.

For the changed example see http://is.gd/28ak9E

Also fixed a minor grammar issue.
2015-05-11 19:58:57 +05:30
Manish Goregaokar
b0b6db6cb3 Rollup merge of #25284 - petehunt:patch-1, r=steveklabnik
Noticed this while perusing the docs
2015-05-11 19:58:56 +05:30
Manish Goregaokar
c891375298 Rollup merge of #25280 - frewsxcv:patch-22, r=steveklabnik 2015-05-11 19:58:56 +05:30
Michael Sproul
ce7ef32982 Markdown formatting for error explanations. 2015-05-11 23:04:31 +10:00
bors
8004fc9fe0 Auto merge of #25277 - polachok:docfix, r=steveklabnik
r? @steveklabnik
2015-05-11 12:07:39 +00:00
Johannes Oertel
5b0e19794e Minor optimization for VecMap::split_off
We don't need to copy any elements if `at` is behind the last element
in the map. The last element is at index `self.v.len() - 1`, so we
should not copy if `at` is greater or equals `self.v.len()`.
2015-05-11 12:54:59 +02:00
bors
af57ec5851 Auto merge of #25271 - tshepang:doc-deunwrap, r=steveklabnik 2015-05-11 09:50:36 +00:00
Kevin Ballard
52efe55d04 Handle overflow properly in core::slice
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-11 01:16:09 -07:00
Ricardo Martins
aa529ef52e Add missing keyword in extern crate declarations. 2015-05-11 09:10:49 +01:00
Ricardo Martins
ef030555c6 Improve wording in error explanation. 2015-05-11 09:10:19 +01:00
Michał Czardybon
bff170786c Fixed one textual mistake and one casing error.
Corrected "Ownership":

- [`Variable bindings`] link was not processed properly.
- Changed the paragraph about move semantics with two vectors, because it was confusing.
- Removed "So it may not be as inefficient as it initially seems", because there is nothing that seems inefficient in copying pointers only.
- Other text corrections.

Fixed copied-and-pasted text mistakes.

Revised the paragraph about moving a vector (taking into account suggestions by echochamber).

Fixed markdown.

Fixes requested by steveklabnik.

Brought back a sentence about supposed inefficiency.
2015-05-11 09:02:25 +02:00
bors
c44d84da98 Auto merge of #25266 - richo:windows-resource-sancheck, r=steveklabnik
This avoids a crash on windows

Closes #25265
2015-05-11 06:42:25 +00:00
bors
7334518579 Auto merge of #25085 - carols10cents:remove-old-tilde, r=steveklabnik
There were still some mentions of `~[T]` and `~T`, mostly in comments and debugging statements. I tried to do my best to preserve meaning, but I might have gotten some wrong-- I'm happy to fix anything :)
2015-05-11 04:46:41 +00:00
Carol Nichols
218d38fb94 Overwrite grammar sections with what was removed from the reference
Between ffc5f1c, when grammar.md was created by copying parts of the
reference, and 8cf2552, when all EBNF was removed from reference.md,
there were parts of the grammar that were updated in reference.md but
not grammar.md, and then they weren't copied over because they existed
already, but they were slightly out of date.

Example: the `path_item : ident | "self" ;` rule in Use declarations was
changed from "mod" to "self" in the reference in 195fd9a but wasn't
updated in the grammar.
2015-05-10 22:47:39 -04:00
Carol Nichols
53cd0bc772 Add literal semicolon to the grammar of view_item
Both external crate declarations and use declarations need to end with a
semicolon.
2015-05-10 22:47:39 -04:00
Carol Nichols
c3156a8ff4 Remove operator precedence section covered in the reference 2015-05-10 22:47:39 -04:00
Carol Nichols
e607d76564 Fill in more parts of the grammar for Expressions 2015-05-10 22:47:31 -04:00