Commit Graph

49108 Commits

Author SHA1 Message Date
Dave Huseby
f813b06bc1 Fixes #30521 and #30627 by adding new snapshots 2015-12-30 09:02:02 -08:00
Scott Olson
78526fcfd1 Add test for MIR range matching. 2015-12-30 10:39:27 -06:00
Scott Olson
8a834097cc Use built-in comparisons for range matching in MIR.
The previous version using `PartialOrd::le` was broken since it passed `T`
arguments where `&T` was expected.

It makes sense to use primitive comparisons since range patterns can only be
used with chars and numeric types.
2015-12-30 10:25:41 -06:00
bors
efb5a9a9f0 Auto merge of #30640 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #30373, #30502, #30511, #30546, #30556, #30620
- Failed merges:
2015-12-30 16:07:08 +00:00
est31
40a9481f87 Limit line length to below 100 chars 2015-12-30 16:27:55 +01:00
est31
94434f1f6c Move pub-{item,methd}-macro.rs to the parse-fail subdir as well 2015-12-30 16:23:50 +01:00
est31
1bbcceb9f6 Move pub-macro-rules.rs test to parse-fail directory 2015-12-30 16:23:49 +01:00
est31
f4eb44e4df whitespace after colon, not before 2015-12-30 16:23:49 +01:00
est31
66a12f504f Custom help message for people trying to make macro public
The current help message is too much about "normal" macros to be used
as general message. Keep it for normal macros, and add custom help and
error messages for macro definitions.
2015-12-30 16:23:49 +01:00
Steve Klabnik
a73df6bf24 Rollup merge of #30620 - salty-horse:an_mut, r=brson
As discussed in issue #30568.
2015-12-30 09:24:24 -05:00
Steve Klabnik
31edbad60a Rollup merge of #30556 - nodakai:patch-1, r=brson
Use proper URLs as given by Github.

So far we relied on redirect by Github which is not guaranteed to work.
2015-12-30 09:24:24 -05:00
Steve Klabnik
9579a08e55 Rollup merge of #30546 - tshepang:add-links, r=steveklabnik 2015-12-30 09:24:24 -05:00
Steve Klabnik
8e98120780 Rollup merge of #30511 - defyrlt:issue_30507, r=steveklabnik
Resolves #30507

r? @steveklabnik
2015-12-30 09:24:24 -05:00
Steve Klabnik
f37e69ebb0 Rollup merge of #30502 - Luke-Nukem:master, r=steveklabnik
Rewrite of a paragraph in in the `match` section.

The colon `:` should be used only when the sentence preceeding it is a
complete sentence. If this is not the case, then a `;` should be used;
this denotes that the following fragment is a part of the previous
fragment.

I got a new bike; it has two wheels. (Similar to I got a new bike, it has two wheels)
The ice cream truck has great flavours; blueberry, blackberry, berryberry.

Writing a complete sentence:
- with a list under it
- You can join two sentences with it: Much like this.

r? @steveklabnik
2015-12-30 09:24:24 -05:00
Steve Klabnik
d1f854ab77 Rollup merge of #30373 - ChrisBuchholz:master, r=steveklabnik
The current explanation for scan() is not very clear as to how it works, especially when it compares itself to fold().

I believe these changes makes it all a bit more clear for the reader, and makes it easier to understand the example code.

r? @steveklabnik
2015-12-30 09:24:24 -05:00
bors
85fb3b6fc0 Auto merge of #30526 - Ms2ger:PathParameters, r=brson 2015-12-30 14:19:08 +00:00
Scott Olson
f8b61340e3 Refactor MIR building for arguments. 2015-12-30 06:55:51 -06:00
bors
176ee349a7 Auto merge of #30542 - nrc:errs-base, r=nagisa
As discussed [here](https://internals.rust-lang.org/t/more-structured-errors/3005)

r? @nikomatsakis or anyone else on the @rust-lang/compiler team
2015-12-30 12:27:10 +00:00
Tshepang Lekhonkhobe
a4da9aced9 doc: add graves 2015-12-30 13:30:39 +02:00
Tshepang Lekhonkhobe
6d388da45f doc: add some links for io::stdio 2015-12-30 12:41:15 +02:00
bors
a06bb977d8 Auto merge of #30458 - fhahn:fix-warnings-tests-stdlib, r=sanxiyn
This PR siliences some warnings when compiling stdlib with --test. Mostly remove some unused imports and added a few `#[allow(..)]`.

I also marked some signal handling functions with `#[cfg(not(test))]`, because they are only called through `rt::lang_start`, which is also marked as  `#[cfg(not(test))]`
2015-12-30 07:35:10 +00:00
Scott Olson
b65277496c Fix argument indices in MIR for closures.
Previously, all references to closure arguments went to the argument before the
one they should (e.g. to arg1 when it was supposed to be arg2). This was because
the MIR builder did not account for the implicit arguments that come before the
explicit arguments, and closures have one implicit argument - the struct
containing the captures.
2015-12-29 22:55:38 -06:00
Nick Cameron
04d972906d Rebasing and review comments 2015-12-30 14:54:36 +13:00
Nick Cameron
aaa02b3ff9 Refactoring 2015-12-30 14:27:59 +13:00
Nick Cameron
95dc7efad0 use structured errors 2015-12-30 14:27:59 +13:00
Nick Cameron
253a1cefd8 Structured diagnostics 2015-12-30 14:27:59 +13:00
bors
6e2a64b57a Auto merge of #29974 - brson:gold, r=alexcrichton
When using `cc` for linking rustc will, if gold is available (by looking for `/usr/bin/ld.gold`), pass `-fuse-ld=gold` to `cc`.

In some scenarios gold links much faster than ld. Servo uses it to considerably speed up linking. gold behaves nearly identically to ld (though I think there are rare corner cases that don't work still). I've run this through crater and everything there continues to link.

To disable, pass `-C disable-gold`.
2015-12-30 01:07:19 +00:00
bors
c1035b3522 Auto merge of #30619 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #30253, #30390, #30405, #30549, #30603, #30610
- Failed merges:
2015-12-29 22:21:57 +00:00
Ori Avtalion
e8e649239c book: Replace "an &mut" with "a mut". Fixes #30568 2015-12-29 23:13:23 +02:00
Steve Klabnik
5a02d2293a Rollup merge of #30610 - steveklabnik:gh30600, r=sfackler
Also, make its panic description identical in wording to assert_eq.

Fixes #30600
2015-12-29 15:55:09 -05:00
Steve Klabnik
9ef4030692 Rollup merge of #30603 - cmr:extern-failure-error-message, r=Manishearth
@ubsan brought up this relatively poor error message. This adds a
help message hinting when the problem actually is, and how to fix
it.
2015-12-29 15:55:09 -05:00
Steve Klabnik
bfa36c9ab8 Rollup merge of #30549 - mitaa:doc_dstruct, r=brson
(reported in #30477)
2015-12-29 15:55:09 -05:00
Steve Klabnik
ccaa7e5146 Rollup merge of #30405 - durka:patch-12, r=steveklabnik
Fixes #30217.
2015-12-29 15:55:09 -05:00
Steve Klabnik
2493fbf547 Rollup merge of #30390 - mitaa:patch-1, r=steveklabnik
None of my devices/browsers renders this correctly.

r? @steveklabnik
2015-12-29 15:55:08 -05:00
Steve Klabnik
8e127ee626 Rollup merge of #30253 - Manishearth:diag-401-improve, r=steveklabnik
r? @steveklabnik
2015-12-29 15:55:08 -05:00
Simonas Kazlauskas
feab2ae77e Implement as casting (Misc cast kind) 2015-12-29 20:47:18 +02:00
arcnmx
43ab6c7d5a AsRef and related conversions for CString 2015-12-29 13:02:08 -05:00
Steve Klabnik
d6275b3591 Correct the documentation of debug_assert_eq
Also, make its panic description identical in wording to assert_eq.

Fixes #30600
2015-12-29 11:01:35 -05:00
Florian Hahn
e27cbeff37 Fix warnings when compiling stdlib with --test 2015-12-29 16:07:01 +01:00
Corey Richardson
992feab697
Add a hint when given --extern with an indeterminate type
@ubsan brought up this relatively poor error message. This adds a
help message hinting when the problem actually is, and how to fix
it.
2015-12-29 00:25:37 -05:00
bors
9007d63f24 Auto merge of #30548 - mmcco:linux-syscall, r=brson
There's no need for us to redeclare it in an extern block.

We should probably put the syscall number constants in libc too.
2015-12-28 20:11:34 +00:00
Simonas Kazlauskas
e137c2ad0a [MIR] Translate ConstVal::Function
This moves back (essentially reverts #30265) into MIR-specific translation code, but keeps the
funcition split out, since it is expected to eventually become recursive.
2015-12-28 21:27:10 +02:00
Brian Anderson
34dc0e0739 Link with ld.gold by default
To disable, pass `-C disable-gold`
2015-12-28 18:08:16 +00:00
Michael Woerister
fa2a7411e4 Use a more efficient encoding for opaque data in RBML. 2015-12-28 12:15:44 -05:00
bors
27a1834ce5 Auto merge of #30588 - nagisa:mir-unit-enums-again, r=eddyb
A dumb mistake on my part from previous PR fixing unit enums in MIR.
2015-12-28 14:32:09 +00:00
Simonas Kazlauskas
e7cab13037 [MIR] Fix setting discriminant for unit enums 2015-12-28 15:48:01 +02:00
Ms2ger
b2c370370e Rename ExplicitSelfCategory's variants and stop re-exporting them. 2015-12-28 12:52:43 +01:00
bors
89753077fc Auto merge of #30570 - fhartwig:dead-doc-links, r=steveklabnik
r? @steveklabnik
2015-12-28 09:55:45 +00:00
bors
3989f655e0 Auto merge of #30547 - mmcco:cfg, r=sanxiyn 2015-12-28 06:07:34 +00:00
bors
0e9f6ecd0e Auto merge of #30579 - dotdash:30478, r=arielb1
`auto_ref()` currently returns an Rvalue datum for the ref'd value,
which is fine for thin pointers, but for fat pointers this means that
once the pointer is moved out of that datum, its memory will be marked
as dead. And because there is not necessarily an intermediate temporary
involved we can end up marking memory as dead that is actually still
used.

As I don't want to break the micro-optimization for thin pointers by
always returning an Lvalue datum, I decided to only do so for fat
pointers.

Fix #30478
2015-12-28 02:29:14 +00:00