Commit Graph

65577 Commits

Author SHA1 Message Date
bors b360b44ecf Auto merge of #43083 - kennytm:fix-42434-custom-stdxxx-normalization, r=nikomatsakis
compilertest (UI test): Support custom normalization.

Closes #42434.

Adds this header for UI tests:

```rust
// normalize-stderr-32bit: "fn() (32 bits)" -> "fn() ($PTR bits)"
```

It will normalize the `stderr` output on 32-bit platforms, by replacing all instances of `fn() (32 bits)` by `fn() ($PTR bits)`.

Extends the UI tests in #42304 and #41968 to 32-bit targets.

r? @nikomatsakis
2017-07-11 22:02:20 +00:00
bors 9475ae477a Auto merge of #43116 - alexcrichton:probestack, r=sfackler
Update compiler_builtins submodule for probestack fix

Closes #43102
2017-07-11 17:52:42 +00:00
bors 1475e2c923 Auto merge of #42388 - tschottdorf:projty-substs, r=nikomatsakis
Downgrade ProjectionTy's TraitRef to its substs

Addresses the second part of #42171 by removing the `TraitRef` from
`ProjectionTy`, and directly storing its `Substs`.

Closes #42171.
2017-07-11 15:14:32 +00:00
Tobias Schottdorf 687ee7fee4 Downgrade ProjectionTy's TraitRef to its substs
Addresses the second part of #42171 by removing the `TraitRef` from
`ProjectionTy`, and directly storing its `Substs`.

Closes #42171.
2017-07-11 10:33:09 -04:00
bors dddf24d96f Auto merge of #43006 - GuillaumeGomez:e0611-cleanup, r=nikomatsakis
Clean up some code

From #42669.

r? @nikomatsakis
2017-07-11 10:07:24 +00:00
kennytm 34209b0eaa
Merge ui/README.md into COMPILER_TESTS.md and describe how custom UI normalization works. 2017-07-11 16:57:53 +08:00
kennytm 4582ecda64
compiletest: Support custom normalization rules. 2017-07-11 16:57:52 +08:00
Niko Matsakis 24a5ceab52 tweak word ordering 2017-07-11 10:30:23 +02:00
Guillaume Gomez ef26f1756c Clean up some code 2017-07-11 10:30:23 +02:00
kennytm 18712e6edf
compiletest: Refactor: Move the `ignore-{}` logic into its own method.
Prepare for `normalize-std???` which will share the same logic.
Added `ignore-32bit` and `ignore-64bit`.
2017-07-11 16:15:59 +08:00
bors a1f180bde3 Auto merge of #43147 - oyvindln:deflate_fix, r=alexcrichton
Use similar compression settings as before updating to use flate2

Fixes #42879

(My first PR to rust-lang yay)

This changes the compression settings back to how they were before the change to use the flate2 crate rather than the in-tree flate library. The specific changes are to use the `Fast` compression level (which should be equivialent to what was used before), and use a raw deflate stream rather than wrapping the stream in a zlib wrapper. The [zlib](https://tools.ietf.org/html/rfc1950) wrapper adds an extra 2 bytes of header data, and 4 bytes for a checksum at the end. The change to use a faster compression level did give some compile speedups in the past (see #37298). Having to calculate a checksum also added a small overhead, which didn't exist before the change to flate2.

r? @alexcrichton
2017-07-11 07:42:13 +00:00
bors 1999bfaa9f Auto merge of #42913 - kennytm:fix-40569-ident-without-backtrack, r=jseyfried
Only match a fragment specifier the if it starts with certain tokens.

When trying to match a fragment specifier, we first predict whether the current token can be matched at all. If it cannot be matched, don't bother to push the Earley item to `bb_eis`. This can fix a lot of issues which otherwise requires full backtracking (#42838).

In this PR the prediction treatment is not done for `:item`, `:stmt` and `:tt`, but it could be expanded in the future.

Fixes #24189.
Fixes #26444.
Fixes #27832.
Fixes #34030.
Fixes #35650.
Fixes #39964.
Fixes the 4th comment in #40569.
Fixes the issue blocking #40984.
2017-07-11 04:04:11 +00:00
bors 9228d231fc Auto merge of #43028 - michaelwoerister:dedup-dep-nodes, r=nikomatsakis
incr.comp.: Deduplicate some DepNodes and introduce anonymous DepNodes

This is a parallel PR to the pending https://github.com/rust-lang/rust/pull/42769. It implements most of what is possible in terms of DepNode re-opening without having anonymous DepNodes yet (https://github.com/rust-lang/rust/issues/42298).

r? @nikomatsakis
2017-07-10 21:18:14 +00:00
Niko Matsakis 4f1f671f38 don't panic in `dep_node_debug_str` if `self.data` is `None` 2017-07-10 15:46:00 -04:00
bors bf0a9e0b4d Auto merge of #43152 - Mark-Simulacrum:test-src-doc, r=alexcrichton
Test src/doc once more

This was accidentally broken in https://github.com/rust-lang/rust/pull/42437 since we filtered too early to recurse into sub-directories.

In theory, @bors p=10

r? @alexcrichton
2017-07-10 18:17:00 +00:00
Mark Simulacrum 50799265ca Test src/doc once more 2017-07-10 11:43:02 -06:00
oyvindln 37f56a2ab1 Use similar compression settings as before updating to use flate2
Fixes #42879
2017-07-10 17:54:50 +02:00
bors eb9dfb8bd9 Auto merge of #43109 - pnkfelix:fix-link_args-gate, r=nikomatsakis
Fix feature gate for `#[link_args(..)]` attribute

Fix feature gate for `#[link_args(..)]` attribute so that it will fire regardless of context of attribute.

See also #29596 and #43106
2017-07-10 15:39:47 +00:00
Felix S. Klock II c512dea1ed Fix feature gate for `#[link_args(..)]` attribute so that it will fire
regardless of context of attribute.

Extend the gating test to include the attribute in "weird" places.
2017-07-10 12:27:59 +02:00
Michael Woerister 6d049fb5bb incr.comp.: Cache DepNodes with corresponding query results. 2017-07-10 12:21:39 +02:00
Michael Woerister 0363a23c35 incr.comp.: Introduce the concept of anonymous DepNodes. 2017-07-10 12:21:39 +02:00
Michael Woerister 089860b603 incr.comp.: Manage dependency graph on main thread. 2017-07-10 12:21:39 +02:00
Michael Woerister 13e87d1dbb Fix some `tidy` errors. 2017-07-10 12:20:56 +02:00
Michael Woerister f8b774f1cf Deduplicate DepNode::ConstEval() 2017-07-10 12:20:56 +02:00
Michael Woerister e00bec2dd4 Allow 'tcx in define_dep_nodes! and deduplicate some DepNodes. 2017-07-10 12:20:56 +02:00
Michael Woerister 9808661b3d Add StableHash implementation for ty::Instance. 2017-07-10 12:20:56 +02:00
Michael Woerister ca0a40396c incr.comp.: Improve debug output for work products. 2017-07-10 12:20:56 +02:00
Michael Woerister 2557800fd6 Split DepNode::ItemSignature into non-overlapping variants. 2017-07-10 12:20:56 +02:00
bors d84693b93d Auto merge of #43115 - petrochenkov:methlife2, r=eddyb
Store all generic arguments for method calls in AST/HIR

The first part of https://github.com/rust-lang/rust/pull/42492.
Landed separately to start the process of merging libsyntax changes breaking rustfmt, which is not easy these days.
2017-07-09 21:40:16 +00:00
Vadim Petrochenkov 9ac79e4934 Update rls to pull rustfmt with libsyntax changes 2017-07-10 00:20:25 +03:00
Vadim Petrochenkov 8c44a9dca7 Store all generic arguments for method calls in HIR 2017-07-10 00:20:25 +03:00
Vadim Petrochenkov 287de2595a Store all generic arguments for method calls in AST 2017-07-10 00:20:25 +03:00
bors 8b1271fcdd Auto merge of #43130 - GuillaumeGomez:rustdoc-fn-spacing, r=QuietMisdreavus
Add spacing between trait functions

Fixes #42988.

<img width="1440" alt="screen shot 2017-07-09 at 17 02 16" src="https://user-images.githubusercontent.com/3050060/27995068-672a3208-64c8-11e7-9bc7-c7288f2cd27b.png">
2017-07-09 17:58:10 +00:00
bors 55ad73b026 Auto merge of #43117 - MJDSys:fix_rustbuild_libdir_2, r=alexcrichton
Fix stage 2 builds with a custom libdir.

When copying libstd for the stage 2 compiler, the builder ignores the
configured libdir/libdir_relative configuration parameters.  This causes
the compiler to fail to find libstd, which cause any tools built with the
stage 2 compiler to fail.

To fix this, make the copy steps of rustbuild aware of the libdir_relative
parameter when the stage >= 2.  Also update the dist target to be aware of
the new location of libstd.
2017-07-09 15:42:47 +00:00
Guillaume Gomez 12dccbde41 Add spacing between trait functions 2017-07-09 16:47:29 +02:00
bors 12fef71f18 Auto merge of #43082 - ids1024:condvar2, r=alexcrichton
Redox: Fix Condvar.wait(); do not lock mutex twice

The atomic_xchg() loop locks the mutex, so the call to mutex_lock is
incorrect, and blocks.
2017-07-09 04:23:29 +00:00
bors 79f5c4eb58 Auto merge of #43128 - ibabushkin:master, r=eddyb
Implemented `TypeFoldable` for `TypeError`s.

This is quite handy in some user code, for instance to pull out type errors from an inference context when `fresh_substs_for_item` has been used before.
2017-07-09 01:48:11 +00:00
bors 4b7f41a225 Auto merge of #43097 - PlasmaPower:large-align, r=eddyb
Raise alignment limit from 2^15 to 2^31 - 1

Fixes #42960
2017-07-08 22:09:04 +00:00
Inokentiy Babushkin 41e62105d6
Implemented `TypeFoldable` for `TypeError`s. 2017-07-08 23:24:00 +02:00
bors 720c596ec6 Auto merge of #43075 - durka:error-long-link, r=nikomatsakis
Fix links for typeck diagnostics without tripping tidy

Pick up #42624 to fix #43070 (cc @frewsxcv). I fixed a few other links while I was at it.
2017-07-08 19:50:13 +00:00
Lee Bousfield b4973e9619
Internally limit alignment to 2^30 2017-07-08 13:43:52 -04:00
bors b695889fd6 Auto merge of #43019 - kevinmehall:cleanup-errors, r=nikomatsakis
Remove unused code from librustc_errors

While extracting librustc_errors into a [reusable library](https://github.com/kevinmehall/codemap-diagnostic), I noticed some obsolete code that the `dead_code` warning missed because it was marked `pub` but not used elsewhere.
2017-07-08 17:30:37 +00:00
Lee Bousfield da81a33b05
Box large array to avoid blowing the stack 2017-07-08 13:02:52 -04:00
bors 1e5162ce5b Auto merge of #42996 - Boreeas:merge-e0609-e0612, r=GuillaumeGomez
Fold E0612, E0613 into E0609

As discussed in #42945, with PR 1506 tuple indices are no longer considered a separate case from normal field. This PR folds E06012 ("tuple index out of bounds") and E0613 ("type is not a tuple") into E0609 ("type does not have field with that name")

Resolves #42945
2017-07-08 15:18:46 +00:00
Lee Bousfield afed75a2d9 Lower alignment limit down to 2^31 - 1 (from LLVM) 2017-07-08 10:28:56 -04:00
Lee Bousfield a10213f297 Raised alignment limit from 2^15 to 2^31 2017-07-08 10:28:56 -04:00
bors ac1b675c58 Auto merge of #43104 - nbaksalyar:rustbuild-illumos-fix, r=sanxiyn
Fix Rustbuild linking on Illumos

Illumos (an OpenSolaris fork) expects to get several extra library references for some system functions used by Rust standard library. This commit adds required linker options to rustbuild, which is currently doesn't work on Illumos-based operating systems.
2017-07-08 13:08:11 +00:00
bors 4d4d76cf42 Auto merge of #43077 - SimonSapin:ranges, r=alexcrichton
Implement O(1)-time Iterator::nth for Range*, and slim the Step trait

Fixes #43064.
Fixes part of #39975.
Fixes items 1 <s>and 3</s> of #42168.
CC #27741.

I think #42310 and #43012 should not have landed without the `nth` part of this PR, but oh well.
2017-07-08 07:30:21 +00:00
Simon Sapin e9a61eeb04 Add tests for reaching the end of RangeInclusive as an iterator 2017-07-08 08:55:55 +02:00
Simon Sapin 7a40307a7c Add tests for Range*::nth 2017-07-08 08:55:55 +02:00