Commit Graph

64869 Commits

Author SHA1 Message Date
bors
bb907adbbd Auto merge of #42381 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
Rollup of 10 pull requests

- Successful merges: #41981, #42225, #42310, #42319, #42335, #42343, #42355, #42360, #42370, #42372
- Failed merges:
2017-06-02 22:19:08 +00:00
Oliver Middleton
88c791bf69 rustdoc: Hide self: Box<Self> in list of deref methods
These methods can never be called through deref so there is no point
including them. For example you can't call `into_boxed_bytes` or
`into_string` on `String`.
2017-06-02 22:37:11 +01:00
Guillaume Gomez
6675bb3e73 Add E0603 error code 2017-06-02 21:40:22 +02:00
bors
107bd67ef7 Auto merge of #42189 - nikomatsakis:chalk-trait-env-param-env, r=eddyb
querify layout and move param env out of the infcx

The main goal of this PR is to move the parameter environment *out* of the inference context. This is because the inference environment will soon be changing over the course of inference --- for example, when we enter into a `for<'a> fn(...)` type, we will push a new environment with an increasing universe index, rather than skolemizing the `'a` references. Similarly, each obligation will soon be able to have a distinct parameter environment, and therefore the `Obligation` struct is extended to carry a `ParamEnv<'tcx>`. (I debated about putting it into the cause; seems plausible, but also weird.)

Along the way, I also reworked how layout works, moving the layout cache into a proper query along the lines of needs-drop and friends.

Finally, tweaks the inference context API. It seemed to be accumulating parameters at an alarming rate. The main way to e.g. make a subtype or equality relationship is to do the following:

    infcx.at(cause, param_env).sub(a, b)
    infcx.at(cause, param_env).eq(a, b)

In both cases, `a` is considered the "expected" type (this used to be specified by a boolean). I tried hard to preserve the existing notion of what was "expected", although in some cases I'm not convinced it was being set on purpose one way or the other. This is why in some cases you will see me do `sup(b, a)`, which is otherwise equivalent to `sub(a, b)`, but sets the "expected type" differently.

r? @eddyb
cc @arielb1
2017-06-02 19:23:14 +00:00
gentoo90
b9f9c77103 Add separate GDB pretty-printer for empty structs
Use a class without children() method for printing empty structs.
Presence of this method makes GDB's variable objects interface act like
if the struct had children.
2017-06-02 21:29:24 +03:00
Guillaume Gomez
7cc1ab4480 Add E0602 2017-06-02 20:09:35 +02:00
Mark Simulacrum
3447aa764a Quiet tests on PR tests 2017-06-02 12:04:00 -06:00
Manish Goregaokar
fdb2837bd9 Vec<T> is pronounced 'vec' 2017-06-02 10:59:19 -07:00
Mark Simulacrum
98dc118c72 Reduce sccache log level. 2017-06-02 11:44:54 -06:00
Esteban Küber
e935acfa5c Use multiline note for trait suggestion 2017-06-02 10:15:13 -07:00
Alex Crichton
225073eff8 rustbuild: Remove RUSTFLAGS logic in rustc shim
This was added in #38072 but I can't recall why and AFAIK Cargo already handles
this. This was discovered through #42146 where passing duplicate flags was
causing problems.
2017-06-02 09:57:20 -07:00
Josh Stone
617aea4c9b rustbuild: Add ./x.py test --no-fail-fast
This option forwards to each `cargo test` invocation, and applies the
same logic across all test steps to keep going after failures.  At the
end, a brief summary line reports how many commands failed, if any.

Note that if a test program fails to even start at all, or if an
auxiliary build command related to testing fails, these are still left
to stop everything right away.

Fixes #40219.
2017-06-02 09:27:44 -07:00
kennytm
3e6c83de1d
compiletest: Force directive to be first complete word in header comment.
Refactored some related code to take advantage of this change.
2017-06-02 23:28:22 +08:00
kennytm
38ef85696d
Introduce 'run-pass' header to 'ui' tests in compiletest. Fix issue #36516.
The 'run-pass' header cause a 'ui' test to execute the result. It is used
to test the lint output, at the same time ensure those lints won't cause
the source code to become compile-fail.

12 run-pass/run-pass-fulldeps tests gained the header and are moved to
ui/ui-fulldeps. After this move, no run-pass/run-pass-fulldeps tests should
rely on the compiler's JSON message. This allows us to stop passing
`--error-format json` in run-pass tests, thus fixing #36516.
2017-06-02 23:28:22 +08:00
Mark Simulacrum
e05f1c1290 Rollup merge of #42372 - frewsxcv:frewsxcv/improve-receiver-docs, r=QuietMisdreavus
Rewrite a couple `Receiver` doc examples.

None
2017-06-02 09:10:49 -06:00
Mark Simulacrum
1a3d026094 Rollup merge of #42370 - mbrubeck:docs, r=frewsxcv
Add [[T]] -> [T] examples to SliceConcatExt docs

None
2017-06-02 09:10:48 -06:00
Mark Simulacrum
7a2d4b30b6 Rollup merge of #42360 - ollie27:rustdoc_vector_rename, r=GuillaumeGomez
rustdoc: Rename `Vector` and `FixedVector` to `Slice` and `Array`

Also store the array length as a usize rather than a String.

This is just a minor refactor.
2017-06-02 09:10:47 -06:00
Mark Simulacrum
812966717b Rollup merge of #42355 - bjorn3:patch-1, r=Mark-Simulacrum
Syntax highlight rust code in librustc/dep_graph/README.md
2017-06-02 09:10:46 -06:00
Mark Simulacrum
5775c9ec5f Rollup merge of #42343 - cuviper:install-executables, r=alexcrichton
Update rust-installer for Windows executable mode

It now marks a few whitelisted extensions as executable in the tarball,
so Windows packages can be extracted on other platforms and directly
execute install.sh.

It also includes a fix for the chmod on bulk dirs, so now the html docs
won't be marked executable en masse.

Fixes #42121
r? @alexcrichton
2017-06-02 09:10:45 -06:00
Mark Simulacrum
c7287d9c09 Rollup merge of #42335 - jcowgill:fingerprint-be, r=michaelwoerister
Don't byteswap Fingerprints when encoding

Byteswapping Fingerprints when encoding is unnessesary and breaks if the Fingerprint is later decoded on a machine with different endianness to the one it was encoded on.

Fixes #42239

This PR fixes a regression caused by #42082. @michaelwoerister
2017-06-02 09:10:44 -06:00
Mark Simulacrum
85e5e20363 Rollup merge of #42319 - Manishearth:const-extern, r=nikomatsakis
Improve error message for const extern fn

It's currently ``error: unmatched visibility `pub` ``, which is a nonsensical error in this context.
2017-06-02 09:10:43 -06:00
Mark Simulacrum
1316281f2d Rollup merge of #42310 - scottmcm:deprecate-range-stepby, r=alexcrichton
Deprecate range-specific `step_by`

Deprecation attributes and test updates only.

Was replaced by an any-iterator version in https://github.com/rust-lang/rust/pull/41439

Last follow-up (this release) to https://github.com/rust-lang/rust/pull/42110#issuecomment-303210138

r? @alexcrichton
2017-06-02 09:10:42 -06:00
Mark Simulacrum
551dd7c7a2 Rollup merge of #42225 - brson:vs2017, r=alexcrichton
Support VS 2017

Fixes #38584

This replaces all the MSVC linker logic with that from the 'gcc' crate. The code looks the same, but there could be regressions.

I've only tested this with x86_64.

r? @alexcrichton
cc @vadimcn @retep998
2017-06-02 09:10:42 -06:00
Mark Simulacrum
32f418f60a Rollup merge of #41981 - gamazeps:thread-detach, r=frewsxcv
[Doc] Expands `detach` documentation in `thread::JoinHande`.

Part of #29378 .

- Adds an example of a thread detaching.
- Expands what `detaching` means.

r? @steveklabnik
2017-06-02 09:10:41 -06:00
gentoo90
c1f687b73f Add GDB pretty-printer for OsString 2017-06-02 16:18:00 +03:00
steveklabnik
fd2cbf9956 Coming soon 2017-06-02 08:58:00 -04:00
bors
d7798c3d17 Auto merge of #42128 - kennytm:travis-folder, r=alexcrichton
Improve Travis CI log (travis_fold, colors)

Result looks like (https://travis-ci.org/rust-lang/rust/jobs/234614611):

<details><summary>Full page screenshot</summary>

![1-fullpage](https://cloud.githubusercontent.com/assets/103023/26302841/2627c354-3f18-11e7-9299-52a2088639af.jpg)

</details>

---

* Bring back colors on Travis, which was disabled since #39036. Append `--color=always` to cargo when running in CI environment.
* Removed `set -x` from the shell scripts. The `retry` function already prints which command it is running, adding `-x` just adds noise to the output. Interesting information can be manually `echo`ed.
* Support `travis_fold`/`travis_time`. Matching pairs of these allow Travis CI to collapse the output in between. This greatly cut down the unnecessary "successful" output one need to scroll through before finding the failed statement.
* Passed `--quiet` to all tests, so tests not failing will not occupy a line of log, reducing bloat in the report.

Also include some minor changes, like changing the `script` of `.travis.yml` to execute a single-line command, so the log won't write the extremely long multi-line
`The command "if [ "$ALLOW_PR" = "" ] && [ "$TRAVIS_BRANCH" != "auto" ]; then … " exited with 0` at the end.
2017-06-02 12:14:14 +00:00
Peter Atashian
42ac31182b
Add test for vecs with overaligned data 2017-06-02 06:30:54 -04:00
Peter Atashian
077c23e987
Improve reallocation in alloc_system on Windows 2017-06-02 06:29:58 -04:00
Felix Raimundo
b76b9e1467 Expands detach documentation in thread::JoinHande.
Part of #29378 .

- Adds an example of a thread detaching.
- Expands what `detaching` means.
2017-06-02 12:26:04 +02:00
bors
558cd1e393 Auto merge of #41670 - scottmcm:slice-rotate, r=alexcrichton
Add an in-place rotate method for slices to libcore

A helpful primitive for moving chunks of data around inside a slice.

For example, if you have a range selected and are drag-and-dropping it somewhere else (Example from [Sean Parent's talk](https://youtu.be/qH6sSOr-yk8?t=560)).

(If this should be an RFC instead of a PR, please let me know.)

Edit: changed example
2017-06-02 07:51:20 +00:00
bors
668e698bba Auto merge of #41418 - hirschenberger:prefetch-intrinsic, r=nagisa
Adding support for the llvm `prefetch` intrinsic

Optimize `slice::binary_search` by using prefetching.
2017-06-02 04:58:09 +00:00
Corey Farwell
eb48ee72db Rewrite Receiver::try_iter doc example to show resulting values. 2017-06-02 00:21:32 -04:00
Corey Farwell
d3f3e26db0 Rewrite Receiver::iter doc example to show resulting values. 2017-06-02 00:21:27 -04:00
steveklabnik
9001b2e09d Update various book repos for the next release. 2017-06-01 20:29:57 -04:00
Matt Brubeck
818ca98222 Add [[T]] -> [T] examples to SliceConcatExt docs 2017-06-01 17:26:52 -07:00
Ralf Jung
763ef81658 array drop glue: avoid using out-of-bounds index lvalues 2017-06-01 16:55:59 -07:00
Brian Anderson
da100fe0bb Support VS 2017
Fixes #38584
2017-06-01 20:41:38 +00:00
gentoo90
c7ef85ca0e Add test for 'invalid literal for int()' exception in gdb pretty-printers 2017-06-01 21:26:09 +03:00
Niko Matsakis
84047db2ad fix ui reference 2017-06-01 13:31:12 -04:00
Niko Matsakis
4c599bc198 fix librustc_driver tests 2017-06-01 13:31:12 -04:00
Niko Matsakis
af223fae27 pacify the mercilous tidy 2017-06-01 13:31:12 -04:00
Niko Matsakis
c7a2e32c10 ergonomic improvements to the methods in infcx 2017-06-01 13:31:11 -04:00
Niko Matsakis
c1e895d92c remove layout_cache and fix -Z print-type-sizes
now we grow the type-sizes info during execution, rather than walking
the cache after the fact
2017-06-01 13:31:11 -04:00
Niko Matsakis
5fb0f0dc2e strip param-env from infcx 2017-06-01 13:31:09 -04:00
Aaron Power
02c0d3ce3d Updated releases notes for 1.18 2017-06-01 17:28:11 +00:00
kennytm
6ac0787ff3
ci: Further tone down the test verbosity.
When `--quiet` is passed to rustbuild, suppress rustdoc test output unless
failure.

Added a `--quiet` flag to `tidy`, which suppresses the features table.

The actual `--quiet` flag is enabled in #42354.

Since details of failed tests will still be printed, and the name of slow
tests taking >60 to runtime will also be printed, the debugging difficulty
caused by information loss should be minimal; but it is very worthwhile to
keep the log under 10000 lines on Travis CI so that common errors can be
spotted without reading the raw log.
2017-06-02 01:22:37 +08:00
kennytm
1222b7a9d1
Change .travis.yml's language: minimal to generic.
There is no `minimal` language. Due to travis-ci/travis-ci#4895, it will
fallback to `ruby`, which certainly isn't what we want. `generic` is an
undocumented (travis-ci/docs-travis-ci-com#910) language that serves the
desired purpose.
2017-06-02 01:14:26 +08:00
kennytm
e6e5dc0e9c
ci: Improve log output (mainly Travis).
* Bring back colors on Travis, which was disabled since #39036.
  Append --color=always to cargo when running in CI environment.
* Removed `set -x` in the shell scripts. The `retry` function already
  prints which command it is running, add `-x` just add noise to the
  output.
* Support travis_fold/travis_time. Matching pairs of these allow Travis CI
  to collapse the output in between. This greatly cut down the unnecessary
  "successful" output one need to scroll through before finding the failed
  statement.
2017-06-02 01:14:26 +08:00
kennytm
1a1ea253f2
Added --color flag to compiletest. 2017-06-02 01:14:25 +08:00