Commit Graph

42640 Commits

Author SHA1 Message Date
bors
0d707d15f6 Auto merge of #25485 - XuefengWu:24968_err_msg_parse_self_type_2, r=nrc
fix #24968
report more friendly error message for Self when fn args
copy from https://github.com/rust-lang/rust/pull/25096
r? @nrc  @arielb1
2015-05-16 20:53:42 +00:00
bors
d332aead90 Auto merge of #25434 - dotdash:gep, r=alexcrichton
Using regular pointer arithmetic to iterate collections of zero-sized types
doesn't work, because we'd get the same pointer all the time. Our
current solution is to convert the pointer to an integer, add an offset
and then convert back, but this inhibits certain optimizations.

What we should do instead is to convert the pointer to one that points
to an i8\*, and then use a LLVM GEP instructions without the inbounds
flag to perform the pointer arithmetic. This allows to generate pointers
that point outside allocated objects without causing UB (as long as you
don't dereference them), and it wraps around using two's complement,
i.e. it behaves exactly like the wrapping_* operations we're currently
using, with the added benefit of LLVM being able to better optimize the
resulting IR.
2015-05-16 19:17:30 +00:00
bors
6403a2fc32 Auto merge of #25462 - alexcrichton:favicon-https, r=nrc
Helps prevent mixed content warnings if accessing docs over HTTPS.

Closes #25459
2015-05-16 17:41:28 +00:00
bors
5e535eae5c Auto merge of #25460 - P1start:rc-unsized-impls, r=luqmana
Most of `Rc`’s trait implementations were DST-ified in #24619, but not these ones.
2015-05-16 16:06:05 +00:00
Xuefeng Wu
7fe60c1636 fix error message in test 2015-05-16 21:39:48 +08:00
bors
63b000b1b8 Auto merge of #25444 - nikomatsakis:macro-tt-fix, r=pnkfelix
Permit token trees, identifiers, and blocks to be following by sequences.

Fixes #25436.

r? @pnkfelix
2015-05-16 12:29:31 +00:00
Niko Matsakis
7a5d74828b Add test for two sequence repetitions in a row 2015-05-16 08:26:44 -04:00
bors
8fdb3a4ad9 Auto merge of #25487 - P1start:extern-crate-unexpected-error, r=huonw
Closes #25468.
2015-05-16 10:53:25 +00:00
P1start
dadac15477 Clarify the error message for malformed extern crate statements
Closes #25468.
2015-05-16 22:35:59 +12:00
Xuefeng Wu
574a8cd8cc fix trait capitalise typo in test file 2015-05-16 17:37:11 +08:00
Xuefeng Wu
5cf6b02571 fix typo for copyright year and trait capitalise 2015-05-16 17:29:48 +08:00
XuefengWu
1e39d9b95d change Self type error message 2015-05-16 17:22:27 +08:00
Xuefeng Wu
8e82c21bf3 more friend error message for in fn arg 2015-05-16 17:21:43 +08:00
bors
0becf6aec7 Auto merge of #25453 - jimblandy:FQA-fiasco-link, r=alexcrichton
Fix the link to the "static initialization order fiasco" discussion in the C++ Frequently Questioned Answers.

At present the link points to a mail message summarizing the decision not to have resumable exceptions, but the FAQ means to refer to a discussion of the "static initialization order fiasco". I've made my best guess at what it meant to refer to.
2015-05-16 08:37:31 +00:00
bors
15c18e725c Auto merge of #25450 - dnaeon:docs, r=alexcrichton 2015-05-16 07:01:32 +00:00
bors
7dbee36e17 Auto merge of #25449 - IvanUkhov:std-doc, r=alexcrichton 2015-05-16 05:25:44 +00:00
bors
e10bd27f50 Auto merge of #25447 - brson:version, r=alexcrichton 2015-05-16 03:48:24 +00:00
bors
4ce08a5d70 Auto merge of #25440 - durka:patch-3, r=alexcrichton
The Traits chapter uses "adding methods to `int`" as an example of "something bad", but there is no such thing as `int` anymore, right? So I changed it to `i32`.
2015-05-16 02:11:11 +00:00
bors
7a52835c1a Auto merge of #25466 - P1start:move-closure-span, r=alexcrichton
Closes #24986.
2015-05-16 00:32:35 +00:00
P1start
5a1b336a01 Fix the spans of move closures
Closes #24986.
2015-05-16 11:24:06 +12:00
Alex Crichton
0e21beb761 libs: Move favicon URLs to HTTPS
Helps prevent mixed content warnings if accessing docs over HTTPS.

Closes #25459
2015-05-15 16:04:01 -07:00
P1start
fa28642de9 Allow ?Sized types in Rc’s impls of {Partial,}{Ord,Eq} and Borrow 2015-05-16 11:01:52 +12:00
bors
daaf715539 Auto merge of #25432 - killercup:patch-12, r=steveklabnik
`[let]` was already defined in line 11. Pandoc shows a warning for this. I'm not sure if it's actually invalid Markdown.

r? @steveklabnik
2015-05-15 22:55:03 +00:00
bors
a9ea33fa30 Auto merge of #25437 - MazinZ1:master, r=alexcrichton
The download links of Windows installers on the Nightly Rust page are using beta builds instead of nightly builds, which caused some confusions when I was setting up my env. Probably it's better to use the links of nightly builds here.
2015-05-15 21:17:42 +00:00
Marin Atanasov Nikolov
92e44b0422 docs: Typo fix 2015-05-15 21:46:59 +03:00
Ivan Ukhov
a8260fe752 std: fix a link 2015-05-15 14:46:51 -04:00
bors
716f920b7e Auto merge of #25429 - nham:patch-1, r=steveklabnik
Tries to make the introductory portion of the README flow better.
2015-05-15 18:32:43 +00:00
Brian Anderson
6149e32b0b Bump version to 1.2 2015-05-15 11:24:00 -07:00
Niko Matsakis
724b6ed751 Permit token trees, identifiers, and blocks to be following by
sequences.

Fixes #25436.
2015-05-15 13:23:27 -04:00
bors
b948d81c44 Auto merge of #25219 - Eljay:fix-comment-parsing, r=alexcrichton
Fixes #25182, parser didn't account for \r\n in regular comments, only doc-comments.
2015-05-15 16:53:53 +00:00
Alex Burka
900f27dc7c trpl: change from "int" to "i32" in Traits
The Traits chapter uses "adding methods to `int`" as an example of "something bad", but there is no such thing as `int` anymore, right? So I changed it to `i32`.
2015-05-15 12:14:39 -04:00
bors
9bebe5f3bb Auto merge of #25059 - erickt:pprint, r=acrichto
The recent quote changes unfortunately broke unquoting statements like `let foo = 5` because the parser requires their to be a trailing semicolon in those statements. Along the way I added support for unquoting generics and where clauses as well as better pretty printing of `token::Interpolated`.
2015-05-15 15:14:25 +00:00
Erick Tryzelaar
b62290d421 syntax: Unquoting some statements requires trailing semicolons 2015-05-15 08:07:48 -07:00
Erick Tryzelaar
7b00658413 syntax: Add unquoting ast::{Generics,WhereClause} 2015-05-15 08:01:55 -07:00
Erick Tryzelaar
eef6b4a37b syntax: Allow pretty printing more interpolated items 2015-05-15 08:01:55 -07:00
Z1
26560e75b7 Fix download links of Nightly Windows installers
The download links of Windows installers on the Nightly Rust page are using beta builds instead of nightly builds, which caused some confusions when I was setting up my env. Probably it's better to use the links of nightly builds here.
2015-05-15 10:52:47 -04:00
bors
13a4b83c1a Auto merge of #25402 - parir:master, r=Manishearth
r? @steveklabnik
2015-05-15 13:35:49 +00:00
Björn Steinbrink
eeeb2cc0df Allow for better optimizations of iterators for zero-sized types
Using regular pointer arithmetic to iterate collections of zero-sized types
doesn't work, because we'd get the same pointer all the time. Our
current solution is to convert the pointer to an integer, add an offset
and then convert back, but this inhibits certain optimizations.

What we should do instead is to convert the pointer to one that points
to an i8*, and then use a LLVM GEP instructions without the inbounds
flag to perform the pointer arithmetic. This allows to generate pointers
that point outside allocated objects without causing UB (as long as you
don't dereference them), and it wraps around using two's complement,
i.e. it behaves exactly like the wrapping_* operations we're currently
using, with the added benefit of LLVM being able to better optimize the
resulting IR.
2015-05-15 15:30:22 +02:00
Pascal Hertleif
94be1153f1 TRPL: Fix Inline Code Typography 2015-05-15 14:42:58 +02:00
bors
7ebaf1c5c6 Auto merge of #25423 - dotdash:assume, r=huonw
The assume intrinsic has a strong, negative impact on compile times, so
we're currently only using it in places where LLVM can simplify it to
nonnull metadata on a load intruction. Unfortunately a recent change
that fixed invalid assume calls introduce new assume calls for which
this simplification can not happen, leading to a massive regression in
compile times in certain cases.

Moving the assumptions from the middle of the function to the beginning
allows the simplification to happen again, bringing compile times back
to their old levels.

Fixes #25393
2015-05-15 11:57:31 +00:00
Pascal Hertleif
7d0ae692c9 TRPL: Remove Duplicate Reference
Pandoc shows a warning for this. I'm not sure if it's actually invalid Markdown.
2015-05-15 12:23:26 +02:00
bors
579e31929f Auto merge of #25400 - nrc:save-api, r=huonw
Also start factoring out an API for compiler tools to use and fix a bug that was preventing DXR indexing Rust properly.

r? @huonw
2015-05-15 10:10:35 +00:00
parir
94ecc372b2 5 != 4
Closes #25430
2015-05-15 11:28:32 +02:00
Nick Cameron
7555e7081d comments 2015-05-15 19:06:56 +12:00
bors
072cba9a53 Auto merge of #25422 - cactorium:unsafe_errors, r=huonw
For https://github.com/rust-lang/rust/issues/24407
2015-05-15 06:40:20 +00:00
Nick Hamann
74f1818608 Update README
Tries to make the introductory portion of the README flow better.
2015-05-15 00:43:40 -05:00
Kelvin Ly
190de695f5 Add backticks around language keyword 2015-05-15 00:07:01 -04:00
bors
0077ffe547 Auto merge of #25419 - nrc:time, r=alexcrichton
r? @alexcrichton
2015-05-15 03:46:42 +00:00
bors
daabc8a0c7 Auto merge of #25421 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #25404, #25405, #25407, #25408, #25410, #25412, #25413, #25414, #25418, #25420
- Failed merges:
2015-05-15 01:53:03 +00:00
Björn Steinbrink
02603334ae Fix major compile time regression
The assume intrinsic has a strong, negative impact on compile times, so
we're currently only using it in places where LLVM can simplify it to
nonnull metadata on a load intruction. Unfortunately a recent change
that fixed invalid assume calls introduce new assume calls for which
this simplification can not happen, leading to a massive regression in
compile times in certain cases.

Moving the assumptions from the middle of the function to the beginning
allows the simplification to happen again, bringing compile times back
to their old levels.

Fixes #25393
2015-05-15 03:31:53 +02:00