Commit Graph

65962 Commits

Author SHA1 Message Date
Mark Simulacrum
ed09d6dfe1 Rollup merge of #43471 - ollie27:try_from_ints, r=nagisa
Add missing impl and tests for int to int TryFrom impls

These were missing from #43248.

r? @nagisa
2017-07-26 06:15:08 -06:00
Mark Simulacrum
9f4450b5a0 Rollup merge of #43465 - topecongiro:needs-test, r=Mark-Simulacrum
Add tests for issues with the E-needstest label

Fixes #19181.
Fixes #29516.
Fixes #29798.
Fixes #33504.
Fixes #34780.
Fixes #39211.
Fixes #39467.
Fixes #39720.
2017-07-26 06:15:07 -06:00
Mark Simulacrum
f7d06b3418 Rollup merge of #43463 - nrc:catch-span, r=petrochenkov
Fix the spans of catch blocks to include the `do`
2017-07-26 06:15:06 -06:00
Mark Simulacrum
9d02019f8f Rollup merge of #43462 - dhduvall:solaris-libresolv, r=aturon
DNS functions are in libresolv on Solaris, just like on MacOS
2017-07-26 06:15:05 -06:00
Mark Simulacrum
7fa104f041 Rollup merge of #43458 - RalfJung:verbose, r=nikomatsakis
Fix printing regions with -Z verbose

When dumping MIR with `-Z verbose`, it would print regions on types, but not in the code. It seems the Rvalue printing code tried to be smart and guessed when the `Display` for `Region` would not possibly print anything.

This PR makes it no longer be smart, and just always use the `Display` like all the other code (e.g. printing types) does.
2017-07-26 06:15:05 -06:00
Mark Simulacrum
25e5f0a48d Rollup merge of #43456 - joshlf:spawn-doc-grammar, r=alexcrichton
std:🧵:spawn: Fix grammar in documentation

Closes #43435.
2017-07-26 06:15:04 -06:00
Mark Simulacrum
3751d20ec9 Rollup merge of #43455 - QuietMisdreavus:extend-spec-docs, r=steveklabnik
add a note to Vec's Extend<&T> impl about its slice specialization

From the regular documentation view, it's not at all apparent that [this specialization](5669c9988f/src/liballoc/vec.rs (L1879-L1891)) exists for `slice::Iter`. This adds a documentation blurb to the Extend impl itself to note that this optimization exists.
2017-07-26 06:15:03 -06:00
Mark Simulacrum
b583392058 Rollup merge of #43447 - estebank:import-span, r=nikomatsakis
Point at path segment on module not found

Point at the correct path segment on a import statement where a module
doesn't exist.

New output:

```rust
error[E0432]: unresolved import `std::bar`
 --> <anon>:1:10
  |
1 | use std::bar::{foo1, foo2};
  |          ^^^ Could not find `bar` in `std`
```

instead of:

```rust
error[E0432]: unresolved import `std::bar::foo1`
 --> <anon>:1:16
  |
1 | use std::bar::{foo1, foo2};
  |                ^^^^ Could not find `bar` in `std`

error[E0432]: unresolved import `std::bar::foo2`
 --> <anon>:1:22
  |
1 | use std::bar::{foo1, foo2};
  |                      ^^^^ Could not find `bar` in `std`
```

Fix #43040.
2017-07-26 06:15:02 -06:00
Mark Simulacrum
b5b7266b78 Rollup merge of #42959 - SimonSapin:nonzero-checked, r=sfackler
Make the "main" constructors of NonZero/Shared/Unique return Option

Per discussion in https://github.com/rust-lang/rust/issues/27730#issuecomment-303939441.

This is a breaking change to unstable APIs.

The old behavior is still available under the name `new_unchecked`. Note that only that one can be `const fn`, since `if` is currently not allowed in constant contexts.

In the case of `NonZero` this requires adding a new `is_zero` method to the `Zeroable` trait. I mildly dislike this, but it’s not much worse than having a `Zeroable` trait in the first place. `Zeroable` and `NonZero` are both unstable, this can be reworked later.
2017-07-26 06:15:01 -06:00
Esteban Küber
552ff07758 Point at path segment on module not found
Point at the correct path segment on a import statement where a module
doesn't exist.

New output:

```rust
error[E0432]: unresolved import `std::bar`
 --> <anon>:1:10
  |
1 | use std::bar::{foo1, foo2};
  |          ^^^ Could not find `bar` in `std`
```

instead of:

```rust
error[E0432]: unresolved import `std::bar::foo1`
 --> <anon>:1:16
  |
1 | use std::bar::{foo1, foo2};
  |                ^^^^ Could not find `bar` in `std`

error[E0432]: unresolved import `std::bar::foo2`
 --> <anon>:1:22
  |
1 | use std::bar::{foo1, foo2};
  |                      ^^^^ Could not find `bar` in `std`
```
2017-07-25 21:25:43 -07:00
bors
bad58f2791 Auto merge of #43226 - alexcrichton:aarch64-ci, r=aidanhs
Add a disabled builder for aarch64 emulated tests

This commit adds a disabled builder which will run all tests for the standard
library for aarch64 in a QEMU instance. Once we get enough capacity to run this
on Travis this can be used to boost our platform coverage of AArch64
2017-07-26 03:53:46 +00:00
bors
b5e8a8ef97 Auto merge of #43046 - milmazz:bootstrap-unittest, r=aidanhs
bootstrap: Add doctests and unitests

This commit includes the following changes:

* Include more docstrings in classes, methods, and functions
* Add doctests, which are great for self-documenting our source code
* Add some unit tests with the `unittest` module
* Remove `WindowsError` reference on non-windows systems
* Rename some variables to be more explicit about their meaning
* Move all the attributes defined outside of `__init__`
* Add initial support for Python 3

r? @alexcrichton
2017-07-25 23:46:14 +00:00
bors
c417ee9ae8 Auto merge of #43320 - alexcrichton:new-bootstrap, r=Mark-Simulacrum
Bump master to 1.21.0

This commit bumps the master branch's version to 1.21.0 and also updates the
bootstrap compiler from the freshly minted beta release.
2017-07-25 16:13:16 +00:00
QuietMisdreavus
6e36769d29 add a note to Vec's Extend<&T> impl about its slice specialization 2017-07-25 10:55:23 -05:00
Alex Crichton
9010567dcc Bump master to 1.21.0
This commit bumps the master branch's version to 1.21.0 and also updates the
bootstrap compiler from the freshly minted beta release.
2017-07-25 07:03:19 -07:00
bors
a643bdc681 Auto merge of #43419 - lu-zero:master, r=alexcrichton
Add support for the VSX and Altivec features on PowerPC
2017-07-25 13:36:13 +00:00
Milton Mazzarri
f516765b94 bootstrap: Major refactoring
This commit includes the following:

* Fix syntax errors in Python 3
* Include more docstrings in classes, methods, and functions
* Include unit tests using `unittest`
* Merge implementation of `{rustc,cargo}_out_of_date`
* Merge implementation of `RustBuild.{cargo,rustc}`
* Remove unnecessary source code
* Move all the attributes defined outside of `__init__`
* Remove remaining `%s` from print function
* Remove `WindowsError` reference on non-windows systems
* Rename some variables to be more explicit avoid their meaning
* Run bootstrap tests in the CI process
* Remove non-pythonic getters
* Remove duplicate code in `download_stage0` method
* Reduce the number of branches in `build_bootstrap` method
* Re-raise exception when we cannot execute uname in non-windows systems
* Avoid long lines
2017-07-25 06:37:10 -05:00
bors
5c126bdee6 Auto merge of #43384 - segevfiner:bootstrap-build-argument-fix, r=aidanhs
rustbuild: Fix the --build argument to bootstrap.py

This makes the --build argument also apply for the downloading of the stage0 toolchain and building rustbuild.

Fixes #42116
2017-07-25 08:04:15 +00:00
Oliver Middleton
9ea65a8a71 Add missing impl and tests for int to int TryFrom impls 2017-07-25 06:19:30 +01:00
bors
917260ebc2 Auto merge of #43325 - ollie27:overflowing_literals, r=arielb1
Fix overflowing_literals lint for large f32s

Float literals need to be parsed as the correct type so they can be
rounded correctly.
2017-07-25 04:00:19 +00:00
topecongiro
04aa5c1c76 Add tests for issues with the E-needstest label 2017-07-25 12:23:16 +09:00
bors
7c46c6c59d Auto merge of #43248 - llogiq:num-try-from, r=nagisa
improve the TryFrom implementations

This removes the need for a 128 bit storage by making use of the fact that there can be either no over/underflow, either one or both, and each time the target type suffices to hold the limit for comparison. This also means that the implementation will work in targets without 128bit support (unless it's for 128bit types, of course).

The downside is that the code looks a bit more complex.
2017-07-25 00:48:14 +00:00
Nick Cameron
53884705cb Fix the spans of catch blocks to include the do 2017-07-25 11:39:41 +12:00
Ralf Jung
4e1249d75f avoid printing 'static 2017-07-24 16:32:11 -07:00
Alex Crichton
8ef3f69ffb Add a disabled builder for aarch64 emulated tests
This commit adds a disabled builder which will run all tests for the standard
library for aarch64 in a QEMU instance. Once we get enough capacity to run this
on Travis this can be used to boost our platform coverage of AArch64
2017-07-24 16:24:52 -07:00
Danek Duvall
ea23e50fcb DNS functions are in libresolv on Solaris, just like on MacOS 2017-07-24 15:57:57 -07:00
Ralf Jung
95b0f22240 Fix printing regions with -Z verbose 2017-07-24 13:54:58 -07:00
Andre Bogus
72ef15e0df improve the TryFrom implementations
This removes the need for a 128 bit storage by making use of the fact that
there can be either no over/underflow, either one or both, and each time
the target type suffices to hold the limit for comparison.

The downside is that the code looks a bit more complex.

This test code included in this commit is from @oyvindln 's PR. They also
greatly helped fixing a number of errors I made along the way. Thanks a lot!
2017-07-24 22:41:05 +02:00
bors
598eddf4f7 Auto merge of #43454 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
Rollup of 11 pull requests

- Successful merges: #43297, #43322, #43342, #43361, #43366, #43374, #43379, #43401, #43421, #43428, #43446
- Failed merges:
2017-07-24 20:15:21 +00:00
Joshua Liebow-Feeser
8aa8f80ac0 std:🧵:spawn: Fix grammar in documentation 2017-07-24 11:17:29 -07:00
bors
b80e946101 Auto merge of #43430 - Mark-Simulacrum:rustbuild-fixes, r=alexcrichton
Rustbuild regression fixes

I believe this will fix https://github.com/rust-lang/rust/issues/43427.

This PR also avoids running pretty tests by-default.

r? @alexcrichton
2017-07-24 17:21:04 +00:00
Mark Simulacrum
0bb4291295 Rollup merge of #43446 - zackmdavis:rustdoc_sidebar_unions, r=GuillaumeGomez
rustdoc: add unions to whitelist of sidebar types

This resolves #43405.
2017-07-24 09:16:39 -06:00
Mark Simulacrum
659bfe5d57 Rollup merge of #43428 - waywardmonkeys:doc-fixes, r=estebank
Fix some doc/comment typos.
2017-07-24 09:16:38 -06:00
Mark Simulacrum
fd2331c269 Rollup merge of #43421 - alexcrichton:add-some-build-scripts, r=Mark-Simulacrum
rustc: Add some build scripts for librustc crates

This commit adds some "boilerplate" build scripts to librustc/libsyntax crates
to declare dependencies on various environment variables that are configured
throughout the build. Cargo recently gained the ability to depend on environment
variables in build scripts which can help trigger recompilation of a crate.

This should fix weird bugs where after you make a commit or a few days later
you'll get weird "not built with the same compiler" errors hopefully.
2017-07-24 09:16:37 -06:00
Mark Simulacrum
bf5d6617fd Rollup merge of #43401 - cuviper:homogeneous, r=Mark-Simulacrum
Correct the spelling of "homogeneous"

None
2017-07-24 09:16:36 -06:00
Mark Simulacrum
d1ba747edc Rollup merge of #43379 - s3rvac:fix-exit-status-success-description, r=GuillaumeGomez
Add a missing verb to the description of std::process::ExitStatus::success()

"Signal termination not considered" -> "Signal termination **is** not considered"

The first line of the description was rewrapped so it fits into 80 characters.
2017-07-24 09:16:35 -06:00
Mark Simulacrum
32e607d4a8 Rollup merge of #43374 - stjepang:fix-sort-randomization-comment, r=alexcrichton
Clarify that sort_unstable is deterministic

@frankmcsherry complained that the documentation said "it is randomized but deterministic", which is a contradictory statement.

This PR uses a different and clearer wording.
2017-07-24 09:16:34 -06:00
Mark Simulacrum
f1537da0e8 Rollup merge of #43366 - leshow:bufreader-docs, r=aturon
Fix docs: BufReader/File doesn't need to be mut

Neither `BufReader` nor `File` need to be declared `mut` for most of these examples. The cookbook example using `BufReader` doesn't declare them as `mut` either (https://brson.github.io/rust-cookbook/basics.html#ex-std-read-lines).
2017-07-24 09:16:33 -06:00
Mark Simulacrum
7e72b41d0c Rollup merge of #43361 - michaelwoerister:remove-retrace-path, r=nikomatsakis
Remove unused DefPathTable::retrace_path()

`DefPathTable::retrace_path()` is not used anymore for a while now and removing it also removes the need to build the costly `DefPathTable::key_to_index` map for every upstream crate.

cc #43300

r? @eddyb
2017-07-24 09:16:32 -06:00
Mark Simulacrum
295a789abf Rollup merge of #43342 - ranweiler:no-std-exe-docs, r=alexcrichton
Document use of `compiler_builtins` with `no_std` binaries

See discussion in #43264.

The docs for the `compiler_builtins_lib` feature were removed in
PR #42899. But, though the `compiler_builtins` library has been
migrated out-of-tree, the language feature remains, and is needed to
use the stand-alone crate. So, we reintroduce the docs for the
feature, and add a reference to them when describing how to create a
`no_std` executable.
2017-07-24 09:16:32 -06:00
Mark Simulacrum
da241182ee Rollup merge of #43322 - redox-os:redox_liblibc, r=alexcrichton
Update liblibc

This updates liblibc to the latest master and fixes #43305
2017-07-24 09:16:31 -06:00
Mark Simulacrum
953f381663 Rollup merge of #43297 - infinity0:master, r=alexcrichton
configure: allow distros to disable debuginfo-only-std

This allows builders to generate debugging information for everything, even in a stable release build. This is useful for distros like Fedora (already carrying a [similar patch](https://src.fedoraproject.org/cgit/rpms/rust.git/tree/rust-1.16.0-configure-no-override.patch)) and Debian that automatically put all debuginfo in separate "debug symbol" packages.

This commit preserves the default behaviour of switching these on when a non-dev channel is selected, but allows the user to override this via the `./configure` command line.

In theory, one could also do this via `bootstrap/config.toml` but it doesn't work currently due to #43295.
2017-07-24 09:16:30 -06:00
Mark Simulacrum
fef9b48252 Make dist equivalent to old build system. 2017-07-24 09:05:27 -06:00
bors
5669c9988f Auto merge of #43436 - zackmdavis:union_doc_fields_section_layout, r=GuillaumeGomez
rustdoc: fix layout of Fields section in documentation for unions

Previously, the union fields would all render on the same line with
hideous spacing; comparison to the analogous section for structs makes
it undoubtable that `display: block` is the true intent.

Concisely and definitively resolves #43404 and its perfidious
malignancy.
2017-07-24 11:44:11 +00:00
Luca Barbato
9ed8cf87a6 Add support for PowerPC Altivec/VSX intrinsics 2017-07-24 09:08:20 +00:00
bors
513906c43d Auto merge of #43327 - nrc:rls-config, r=eddyb
Use a config struct for save-analysis

Replaces some existing customisation options, including removing the -Zsave-analysis-api flag

r? @eddyb
2017-07-24 07:29:25 +00:00
Nick Cameron
587a35da68 Make keep_ast configurable by driver clients 2017-07-24 17:25:16 +12:00
Nick Cameron
81fd86e068 Catch a panic in save-analysis 2017-07-24 17:25:16 +12:00
Nick Cameron
5134a5f02c Remove save-analysis-api references from tests and rustbuild 2017-07-24 17:25:16 +12:00
Nick Cameron
ad8ecc20a2 Point RLS submodule at a branch with required changes
And cargo update
2017-07-24 17:25:15 +12:00