Commit Graph

54713 Commits

Author SHA1 Message Date
Will Crichton
5b0f334c6b Renamed phase to compilation_done 2016-07-04 02:47:53 -04:00
Will Crichton
eaf31099ed Added new compilation phase and test 2016-07-04 02:47:19 -04:00
Will Crichton
ce1146ac5f Moved LLVM cleanup to after after_llvm phase 2016-07-04 02:47:19 -04:00
bors
d98da85c5c Auto merge of #34550 - cynicaldevil:master, r=Manishearth
Added a pretty printer for &mut slices

Fixes #30232
I have added a test which checks for correctness in gdb, but I need some help to do the same for lldb.

r? @Manishearth
2016-07-03 23:17:50 -07:00
bors
bbdbe99c7a Auto merge of #34480 - jseyfried:remove_entry_points, r=nrc
Remove redundant `CompileController` entry points

Remove the `after_expand` and `after_write_deps` `CompileController` entry points.

The only things that separate these entry points from `after_hir_lowering` are dep-info generation and HIR map construction, neither of which is computationally intensive or has the potential to error.

r? @nrc
2016-07-03 18:17:36 -07:00
Zack M. Davis
d37edef9dd prefer if let to match with None => {} arm in some places
This is a spiritual succesor to #34268/8531d581, in which we replaced a
number of matches of None to the unit value with `if let` conditionals
where it was judged that this made for clearer/simpler code (as would be
recommended by Manishearth/rust-clippy's `single_match` lint). The same
rationale applies to matches of None to the empty block.
2016-07-03 16:27:02 -07:00
bors
696b703b5a Auto merge of #34530 - alexcrichton:stabilize-1.11, r=aturon
std: Stabilize APIs for the 1.11.0 release

Although the set of APIs being stabilized this release is relatively small, the
trains keep going! Listed below are the APIs in the standard library which have
either transitioned from unstable to stable or those from unstable to
deprecated.

Stable

* `BTreeMap::{append, split_off}`
* `BTreeSet::{append, split_off}`
* `Cell::get_mut`
* `RefCell::get_mut`
* `BinaryHeap::append`
* `{f32, f64}::{to_degrees, to_radians}` - libcore stabilizations mirroring past
  libstd stabilizations
* `Iterator::sum`
* `Iterator::product`

Deprecated

* `{f32, f64}::next_after`
* `{f32, f64}::integer_decode`
* `{f32, f64}::ldexp`
* `{f32, f64}::frexp`
* `num::One`
* `num::Zero`

Added APIs (all unstable)

* `iter::Sum`
* `iter::Product`
* `iter::Step` - a few methods were added to accomodate deprecation of One/Zero

Removed APIs

* `From<Range<T>> for RangeInclusive<T>` - everything about `RangeInclusive` is
  unstable

Closes #27739
Closes #27752
Closes #32526
Closes #33444
Closes #34152
cc #34529 (new tracking issue)
2016-07-03 14:33:55 -07:00
Tshepang Lekhonkhobe
5efc780e14 doc: fix and shorten comment 2016-07-03 22:03:45 +02:00
Nikhil Shagrithaya
036b08917d Added a pretty printer for &mut slices 2016-07-04 00:04:19 +05:30
Alex Crichton
3016626c3a std: Stabilize APIs for the 1.11.0 release
Although the set of APIs being stabilized this release is relatively small, the
trains keep going! Listed below are the APIs in the standard library which have
either transitioned from unstable to stable or those from unstable to
deprecated.

Stable

* `BTreeMap::{append, split_off}`
* `BTreeSet::{append, split_off}`
* `Cell::get_mut`
* `RefCell::get_mut`
* `BinaryHeap::append`
* `{f32, f64}::{to_degrees, to_radians}` - libcore stabilizations mirroring past
  libstd stabilizations
* `Iterator::sum`
* `Iterator::product`

Deprecated

* `{f32, f64}::next_after`
* `{f32, f64}::integer_decode`
* `{f32, f64}::ldexp`
* `{f32, f64}::frexp`
* `num::One`
* `num::Zero`

Added APIs (all unstable)

* `iter::Sum`
* `iter::Product`
* `iter::Step` - a few methods were added to accomodate deprecation of One/Zero

Removed APIs

* `From<Range<T>> for RangeInclusive<T>` - everything about `RangeInclusive` is
  unstable

Closes #27739
Closes #27752
Closes #32526
Closes #33444
Closes #34152
cc #34529 (new tracking issue)
2016-07-03 10:49:01 -07:00
bors
eebfcb8bf4 Auto merge of #34540 - jupp0r:patch-1, r=steveklabnik
Improve code example for try!

This change improves the code example for try!,
avoiding to use try! in the example code that shows
what code constructs try! can replace.
2016-07-03 10:39:53 -07:00
bors
5e858f34df Auto merge of #34532 - jonmarkprice:master, r=steveklabnik
Book: Small grammatical and stylistic edits to book

I've been reading [the book](https://doc.rust-lang.org/book/) and noticed a few small grammatical and stylistic issues which I've rolled into this pull request.

I'm not sure if I should do so many small, unrelated edits in a single pull request but it seems like a lot of overhead for each small edit. Maybe one commit per edit but one pull request per file/section? Feedback is very much appreciated as this is my first pull request ever!

r? @steveklabnik rollup
2016-07-03 07:47:36 -07:00
bors
20183f498f Auto merge of #34504 - retep998:patch-1, r=alexcrichton
Instructions on how to build Rust with rustbuild

This is a much simpler option for those on Windows who use msvc.
2016-07-03 05:02:51 -07:00
bors
da099c2322 Auto merge of #34614 - cynicaldevil:build-time, r=alexcrichton
Build: Shows total time taken to build the compiler

Fixes #34600
Prints the total time taken to build rustc by executing `src/bootstrap/bootstrap.py`; also includes time taken to download `stage0` compiler and deps.

r? @alexcrichton
2016-07-03 02:17:58 -07:00
Sylvestre Ledru
3fcb649277 Fix a few typos in the doc 2016-07-03 10:02:38 +02:00
Sylvestre Ledru
872d107dea Fix a few typos in the code 2016-07-03 10:02:24 +02:00
Jared Manning
5dfd79a8e6 Fix spacing in for loop enumeration example
Add a space between the comma and j in (i, j) to make it look nice.
2016-07-03 03:01:18 -05:00
bors
d9e8a67894 Auto merge of #34597 - CensoredUsername:bootstrap-fix, r=alexcrichton
Support more python 2.7 versions in bootstrap.py

It seems python broke compatability between 2.7.9  and 2.7.12 as on the former a WindowsError was raised while on the latter a subprocess.CalledProcessError was raised while testing for the existence of uname.

As a WindowsError being thrown obviously indicates we're running on windows, this should probably be accepted too.
2016-07-02 23:33:54 -07:00
bors
ecbfa4749a Auto merge of #34591 - brson:relnotes, r=alexcrichton
Release notes for 1.10.0

[Rundered](https://github.com/brson/rust/tree/relnotes/RELEASES.md).

To me highlights look like panic hooks, unix sockets, cargo, and usability improvements.

f? @rust-lang/core @rust-lang/lang @rust-lang/compiler @rust-lang/tools @bstrie
2016-07-02 20:09:13 -07:00
Kaivo Anastetiks
df93e18418 Clarifies the meaning of the external mutability. 2016-07-02 20:39:21 -04:00
bors
45c3a50f39 Auto merge of #34580 - eddyb:two-steps-forward-one-step-backwards, r=nagisa
Revert "Remove the return_address intrinsic."

This reverts commit b30134dbc3.

Servo might want this merged if they don't merge servo/servo#11872 soon.

cc @pnkfelix @jdm
2016-07-02 17:25:05 -07:00
Corey Farwell
c6a04d9ba4 Fix broken markdown link in README. 2016-07-02 20:15:28 -04:00
bors
1ab87b65a2 Auto merge of #34605 - arielb1:bug-in-the-jungle, r=eddyb
fail obligations that depend on erroring obligations

Fix a bug where an obligation that depend on an erroring obligation would
be regarded as successful, leading to global cache pollution and random
lossage.

Fixes #33723.
Fixes #34503.

r? @eddyb since @nikomatsakis is on vacation

beta-nominating because of the massive lossage potential (e.g. with `Copy` this could lead to random memory leaks), plus this is a regression.
2016-07-02 12:25:29 -07:00
bors
e85adffd64 Auto merge of #34443 - eddyb:sized-matters, r=arielb1
Disallow constants and statics from having unsized types.

This is a `[breaking-change]` which fixes #34390 by banning unsized `const` and `static`, e.g.:
```rust
const A: [i32] = *(&[0, 1, 2] as &[i32]);
static B: str = *"foo";
```

This was not intentionally allowed, and other than for `static` since some versions ago, it ICE'd.
If you've been taking advantage of this with `static`, you should be able to just use references instead.
2016-07-02 09:36:52 -07:00
Hariharan R
bdea705465 update cargo doc link
updated proper link of cargo doc that contains details about list of options available in semantic versioninig for the dependencies section in Cargo.toml
2016-07-02 20:36:41 +05:30
Nikhil Shagrithaya
4dbe14005f Build: Shows total time taken to build the compiler 2016-07-02 19:53:02 +05:30
bors
7a262d3034 Auto merge of #34539 - arielb1:metadata-hash, r=alexcrichton
Make the metadata lock more robust

Fixes #33778 and friends.

I also needed to add a metadata encoding version to rlibs, as they did not have it before. To keep it backwards-compatible, I added 4 zeroes to the start of the metadata, which are treated as an empty length field by older rustcs.

r? @alexcrichton
2016-07-02 06:50:59 -07:00
Ariel Ben-Yehuda
42b7c32ac8 fix test fallout 2016-07-02 14:50:36 +03:00
Ariel Ben-Yehuda
e154687f57 add a encoding version to the actual metadata
previously, only .so files included a metadata encoding version, *outside*
of the zlib compressed area. This adds an encoding version inside the metadata
itself, in both .so and .rlib files.

Fixes #33778.
2016-07-02 14:43:52 +03:00
Ariel Ben-Yehuda
0b36fff4d7 make the metadata lock more robust and bump the metadata encoding version
check the metadata lock when loading rather than afterwards

Fixes #33733
Fixes #33015
2016-07-02 14:43:45 +03:00
Peter Atashian
be43c654b3
Instructions on how to build Rust with rustbuild
This is a much simpler option for those on Windows who use msvc.

Signed-off-by: Peter Atashian <retep998@gmail.com>
2016-07-02 06:50:35 -04:00
bors
8a50e295fa Auto merge of #34611 - Manishearth:rollup, r=Manishearth
Rollup of 7 pull requests

- Successful merges: #34531, #34545, #34551, #34566, #34567, #34574, #34583
- Failed merges:
2016-07-02 03:18:59 -07:00
Manish Goregaokar
adda4e41be Rollup merge of #34583 - steveklabnik:remove-unneeded-deprecated, r=alexcrichton
remove unneeded allow flag

There isn't anything deprecated being used in this function.

This built fine for me locally, but just to be sure, should check Travis.
2016-07-02 15:46:50 +05:30
Manish Goregaokar
ebae6d4e79 Rollup merge of #34574 - jviide:patch-1, r=alexcrichton
Fix README.md command consistency

The `./configure` command in README.md's Building Documentation section was missing the `$` prefix. Add the prefix to be consistent with other commands in the document.
2016-07-02 15:46:50 +05:30
Manish Goregaokar
888e2c2e57 Rollup merge of #34567 - alexcrichton:rustbuild-android, r=brson
rustbuild: Implement testing for Android

This commit enhances the rustbuild support for testing Android to the same level
of parity as the makefiles. This involved:

* A new step to copy the standard library and other shared objects to the
  emulator. This is injected as a dependency of all test suites for Android.
* Appropriate arguments are now passed through to compiletest to ensure that it
  can run tests.
* When testing the standard library the test executables are probed for and
  shipped to the emulator to run for each test.
* Fixing compilation of compiler-rt a bit

All support added here is modeled after what's found in the makefiles, just
translating one strategy to another. As an added bonus this commit adds support
for the "check" step to automatically run tests for all targets, and the
"check-target" step now runs all tests for a particular target, automatically
filtering the tests if the target is detected as a cross-compile.

Note that we don't (and probably won't) have a bot which is actually going to
exercise any of this just yet, but all tests have passed locally for me at
least.
2016-07-02 15:46:50 +05:30
Manish Goregaokar
533ce9a7a6 Rollup merge of #34566 - ollie27:linkchecker_invalid_urls, r=alexcrichton
Reject invalid urls in linkchecker

For example root-relative links will now be rejected.

Also remove some exceptions which have since been fixed and fix a typo in
the broken redirect handling.
2016-07-02 15:46:49 +05:30
Manish Goregaokar
76705df226 Rollup merge of #34551 - GuillaumeGomez:runtest_improvement, r=alexcrichton
Improve runtest output
2016-07-02 15:46:49 +05:30
Manish Goregaokar
08f4559537 Rollup merge of #34545 - sanxiyn:rustbuild, r=alexcrichton
Add rustc-stageN targets to rustbuild
2016-07-02 15:46:49 +05:30
Manish Goregaokar
2c643bd4d0 Rollup merge of #34531 - GuillaumeGomez:libsyntax_err_codes, r=jonathandturner
Add error codes in libsyntax

r? @jonathandturner

Fixes #34526
2016-07-02 15:46:49 +05:30
bors
2b59647fae Auto merge of #34515 - alexcrichton:more-checks, r=brson
configure: Check for valid Python on MinGW as well

The LLVM build system is somewhat picky about which Python is used to build it
as it's known to be incompatible with the default `python2` package that ships
with MinGW. This was previously detected for MSVC builds but the logic was left
out for MinGW by accident (now that we've switched to cmake builds for LLVM
everywhere).

This corrects the `./configure` check and also updates the `README.md`
accordingly. Additionally, a number of instructions were updated to work with
the most recent copy of MSYS2.

Closes https://github.com/rust-lang/rust/issues/28260
Closes #34489
2016-07-02 00:29:06 -07:00
吴冉波
dd8151f5e2 doc: make the conditional-compilation example work
If not, the error `does not have these features: foo` confused. 
r? @steveklabnik
2016-07-02 15:19:09 +08:00
bors
7e07e31600 Auto merge of #34492 - retep998:please-be-robust-already, r=alexcrichton
Make MSVC detection ludicrously robust

Resurrection of https://github.com/rust-lang/rust/pull/31158

r? @alexcrichton
2016-07-01 21:39:16 -07:00
bors
32a6373322 Auto merge of #34067 - tbu-:pr_lookup_host_ignore_other_addresses, r=alexcrichton
Ignore unknown address types when looking up hosts

Previously, any function using a `ToSocketAddrs` input would fail if
passed a hostname that resolves to an address type different from the
ones recognized by Rust.

This also changes the `LookupHost` iterator to only include the known
address types, as a result, it doesn't have to return `Result`s any
more, which are likely misinterpreted as failed name lookups.
2016-07-01 18:43:28 -07:00
Ariel Ben-Yehuda
201cdd33df fail obligations that depend on erroring obligations
Fix a bug where an obligation that depend on an erroring obligation would
be regarded as successful, leading to global cache pollution and random
lossage.

Fixes #33723.
Fixes #34503.
2016-07-02 02:20:45 +03:00
bors
01411937ff Auto merge of #33940 - seanmonstar:siphash-1-3, r=alexcrichton
hashmap: use siphash-1-3 as default hasher

Also exposes `SipHash13` and `SipHash24` in `core:#️⃣:sip`, for those that want to differentiate.

For motivation, see this quote from the original issue:

> we proposed SipHash-2-4 as a (strong) PRF/MAC, and so far no attack whatsoever has been found,
although many competent people tried to break it. However, fewer rounds may be sufficient and I would
be very surprised if SipHash-1-3 introduced weaknesses for hash tables.

This keeps a type alias of `SipHasher` to `SipHash24`, and since the internal default hasher of HashMap is specified as "not specified", changing it should not be a breaking change.

Closes #29754
2016-07-01 15:53:07 -07:00
Ariel Ben-Yehuda
c333ebbe63 fix RUST_LOG, hopefully for real this time 2016-07-01 23:52:22 +03:00
Brian Anderson
effc2e9772 Release notes for 1.10.0 2016-07-01 20:30:06 +00:00
Jonathan L
2d7abe88bf Update glossary.md
Added a brief description of Combinators
2016-07-01 13:16:27 -07:00
bors
5661be01b6 Auto merge of #34578 - alexcrichton:lets-just-keep-trying-to-fix-the-nightlies, r=brson
mk: Request -march=i686 on i686 Linux

Apparently the gcc on our dist bot is so old and/or obscure that the default
`-m32` switch doesn't think it can generate i686 code (or something like that).
The compiler-rt build system probes for the `__i686__` define in GCC to compile
for an i686 (vs i386) target, so this was failing on the bots.

This tweaks instead to pass `-march=i686` on i686-unknown-linux-gnu to C code to
ensure that we're compiling for i686 instead of i386. This should hopefully not
actually have an impact other than maybe doing some random optimization it
wasn't able to do so before. In theory this isn't making the target less
compatible as all Rust code is already compiled for i686.

Hopefully closes #34572
2016-07-01 12:51:59 -07:00
CensoredUsername
ad88d50fba Older versions of python 2.7 can raise a WindowsError instead of a subprocess.CalledProcessError when uname does not exist 2016-07-01 18:36:28 +02:00