Commit Graph

49224 Commits

Author SHA1 Message Date
bors
5892852168 Auto merge of #30585 - Ms2ger:ExplicitSelfCategory, r=brson 2015-12-31 01:12:38 +00:00
bors
2370d461a6 Auto merge of #30375 - aaronkeen:issue_28777, r=eddyb
RESTRICTION_STMT_EXPR restriction to allow subsequent expressions to
contain braces.

https://github.com/rust-lang/rust/issues/28777
2015-12-30 23:20:12 +00:00
Dave Huseby
0bd29f8461 Merge pull request #30643 from dhuseby/snaps_2015-12-18-3391630
Fixes #30521 and #30627 by adding new snapshots
edunham uploaded the snapshots.
2015-12-30 14:33:33 -08:00
bors
682cfc5187 Auto merge of #30467 - shahn:master, r=brson
This adds a constructor for a Weak that can never be upgraded. These are
mostly useless, but for example are required when deserializing.
2015-12-30 19:37:53 +00:00
Tshepang Lekhonkhobe
c779e7b782 doc: missed these in a4da9ac 2015-12-30 21:01:42 +02:00
Tshepang Lekhonkhobe
2a7b6834d2 doc: fix grammar 2015-12-30 19:54:06 +02:00
Tshepang Lekhonkhobe
7097baf6ad doc: fix typo 2015-12-30 19:31:28 +02:00
Steve Klabnik
2cff12e0d6 Small refactoring to make this code more clear
This hairy conditional doesn't need to be so. It _does_ need to be a
thin pointer, otherwise, it will fail to compile, so let's pull that out
into a temporary for future readers of the source.

Also, after a discussion with @pnkfelix and @gankro, we don't need these
null checks anymore, as zero-on-drop has been gone for a while now.
2015-12-30 12:06:28 -05:00
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
Scott Olson
31578f5bbf Fix MIR var names and keep them in sync. 2015-12-29 20:32:37 -06:00
Scott Olson
4b605e4938 Use longer names for MIR variable names. 2015-12-29 20:12:54 -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
Luqman Aden
f88c808b73 Process candidates for match in the same order as written in the source. 2015-12-29 17:03:56 -05: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
Steve Klabnik
0c6c34de87 Remove "Learn Rust" from TRPL.
Some history:

While getting Rust to 1.0, it was a struggle to keep the book in a
working state. I had always wanted a certain kind of TOC, but couldn't
quite get it there.

At the 11th hour, I wrote up "Rust inside other langauges" and "Dining
Philosophers" in an attempt to get the book in the direction I wanted to
go. They were fine, but not my best work. I wanted to further expand
this section, but it's just never going to end up happening. We're doing
the second draft of the book now, and these sections are basically gone
already.

Here's the issues with these two sections, and removing them just fixes
it all:

// Philosophers

There was always controversy over which ones were chosen, and why. This
is kind of a perpetual bikeshed, but it comes up every once in a while.

The implementation was originally supposed to show off channels, but
never did, due to time constraints. Months later, I still haven't
re-written it to use them.

People get different results and assume that means they're wrong, rather
than the non-determinism inherent in concurrency. Platform differences
aggrivate this, as does the exact amount of sleeping and printing.

// Rust Inside Other Languages

This section is wonderful, and shows off a strength of Rust. However,
it's not clear what qualifies a language to be in this section. And I'm
not sure how tracking a ton of other languages is gonna work, into the
future; we can't test _anything_ in this section, so it's prone to
bitrot.

By removing this section, and making the Guessing Game an initial
tutorial, we will move this version of the book closer to the future
version, and just eliminate all of these questions.

In addition, this also solves the 'split-brained'-ness of having two
paths, which has endlessly confused people in the past.

I'm sad to see these sections go, but I think it's for the best.

Fixes #30471
Fixes #30163
Fixes #30162
Fixes #25488
Fixes #30345
Fixes #28713
Fixes #28915

And probably others. This lengthy list alone is enough to show that
these should have been removed.

RIP.
2015-12-29 10:58:31 -05:00