Commit Graph

42489 Commits

Author SHA1 Message Date
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
Carol Nichols
ab913c881c Fill in grammar for Statements
Some of this text is duplicated in the reference (and belongs there) so
remove it. It says item grammar is the same, so point to that grammar
section.
2015-05-10 22:37:31 -04:00
Carol Nichols
a5c651cfdf Point to the use declaration section from the re-exporting section
The syntax for re-exporting privacy is covered in the use declaration
item.
2015-05-10 22:27:10 -04:00
Carol Nichols
c9c8ff1762 Add visibility section of the grammar
Namely an optional "pub" before any item. The "pub" in the Use
declaration section should use this too.
2015-05-10 22:26:45 -04:00
Brian Anderson
847c088ac5 Update AUTHORS.txt and RELEASES.md for 1.0 2015-05-10 18:52:12 -07:00
Ulrik Sverdrup
aabdd8e0a6 docs: Update SliceConcatExt docs for assoc types 2015-05-11 03:43:04 +02:00
Ulrik Sverdrup
12d50b2da0 docs: Fixes in Reference Chapter 6.1 2015-05-11 03:41:54 +02:00
Ulrik Sverdrup
098040f8fc docs: Link from tls macros to relevant docs
Fixes #25233
2015-05-11 03:41:54 +02:00
Ulrik Sverdrup
02b8e4e6cf docs: Clarify Path::starts_with (and ends_with)
Fixes #24882
2015-05-11 03:41:53 +02:00
Ulrik Sverdrup
4e8afd65f9 docs: Update FromStr documentation
Fixes #25250
2015-05-11 03:41:53 +02:00
Nick Hamann
3c4facbcfe Add long diagnostics for E0249 and E0250 2015-05-10 20:04:04 -05:00
bors
bef0b4bb02 Auto merge of #24934 - jooert:bitset-append-split_off, r=Gankro
cc #19986
2015-05-11 00:58:33 +00:00
Johann
6a19046423 Four spaces indent, rephrasing 2015-05-11 02:40:02 +02:00
Paul Quint
c98df58593 Update BitSet docs to correct types
Update BitSet docs to correct type in one more spot

removed accidental file
2015-05-10 19:37:24 -05:00
Johann Hofmann
770f0e95a1 Add if let expressions example 2015-05-11 02:03:37 +02:00
Johann Hofmann
295b62dfb9 Docs: Compile-time bounds check in index expression
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
2015-05-11 01:22:57 +02:00
Pete Hunt
a168a15008 Fix typo in references-and-borrowing docs 2015-05-10 16:10:02 -07:00
Nick Hamann
ed1bc684fc Add a link to the E0184 long diagnostic message. 2015-05-10 17:49:12 -05:00
Nick Hamann
021b3f55d6 Revise the E0206 long diagnostics message. 2015-05-10 17:49:12 -05:00
Nick Hamann
a40c49c6db Improve wording for E0204 and E0205 long diagnostic messages. 2015-05-10 17:49:12 -05:00
Nick Hamann
d730750d24 Add long diagnostics for E0184, E0204, E0205, E0206, E0243, E0244. 2015-05-10 17:49:12 -05:00
Nick Hamann
a6dc983a60 Add some comments for error codes in librustc_typeck/diagnostics 2015-05-10 17:47:15 -05:00
robertfoss
90bd31b399 Update AUTHORS.txt 2015-05-10 18:14:24 -04:00
Pete Hunt
6d410132dc Fix typo in guessing-game docs 2015-05-10 15:11:40 -07:00
Tshepang Lekhonkhobe
683da9c384 doc: unwrap is discouraged, so use Some 2015-05-10 23:39:13 +02:00
Jan-Erik Rediger
f11c4ba30c Remove extra parentheses 2015-05-10 23:22:00 +02:00
bors
9ecc9896de Auto merge of #25281 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #24948, #25158, #25188, #25222, #25239, #25240, #25241, #25255, #25257, #25263
- Failed merges:
2015-05-10 20:44:45 +00:00
Steve Klabnik
c70458ba5d Rollup merge of #25263 - fhinkel:master, r=steveklabnik 2015-05-10 16:44:24 -04:00
Steve Klabnik
7ae332c39f Rollup merge of #25257 - dpetersen:mutability-docfix, r=steveklabnik
I think there's a trivial missing word in the Mutability document. I reformatted the resulting paragraph in vim, which seems to match what the rest of the document is doing as far as word wrapping.

Edit: I found another minor thing as I continued reading.

P.S. I'm re-reading the docs, since so much has changed since my first read, and they've gotten even better! Nice job!

r? @steveklabnik
2015-05-10 16:44:23 -04:00
Steve Klabnik
5160bf80cd Rollup merge of #25255 - caipre:diagnostic-messages, r=alexcrichton
Add a few diagnostic messages; part of  #24407.
2015-05-10 16:44:23 -04:00
Steve Klabnik
d065d57690 Rollup merge of #25241 - sindreij:patch-2, r=steveklabnik
The start of the last text block in references was missing, I added it.

r? @steveklabnik
2015-05-10 16:44:23 -04:00
Steve Klabnik
dcc76da5b6 Rollup merge of #25240 - bluss:doc-hashmap-entry, r=steveklabnik
Add example for HashMap::entry()
2015-05-10 16:44:23 -04:00
Steve Klabnik
fa207fafc6 Rollup merge of #25239 - sindreij:patch-1, r=alexcrichton 2015-05-10 16:44:22 -04:00
Steve Klabnik
ba8eb58257 Rollup merge of #25222 - GuillaumeGomez:doc-ref, r=steveklabnik
r? @steveklabnik
2015-05-10 16:44:22 -04:00
Steve Klabnik
a7253780b2 Rollup merge of #25188 - tincann:patch-1, r=steveklabnik 2015-05-10 16:44:22 -04:00
Steve Klabnik
ad1c0c57b8 Rollup merge of #25158 - koute:master, r=alexcrichton
I was profiling my code again and this time AsRef<str> for String
was eating up a considerable chunk of my runtime; adding the inline
annotation made the program run almost twice as fast!

While I was at it I also added the annotation to other implementations
of AsRef as well as AsMut.
2015-05-10 16:44:22 -04:00
Steve Klabnik
371eb87771 Rollup merge of #24948 - derhuerst:patch-1, r=steveklabnik
I've written a small [EditorConfig](http://editorconfig.org) file for Rust development.
2015-05-10 16:44:22 -04:00