Commit Graph

81044 Commits

Author SHA1 Message Date
Niko Matsakis
37db94d3f2 store the HirId of the upvar 2018-07-03 18:10:08 -04:00
Niko Matsakis
f03c0366ad add "free region helpers" 2018-07-03 18:10:08 -04:00
Niko Matsakis
dddd4075b1 generalize find_constraint_paths_between_regions 2018-07-03 18:10:08 -04:00
Niko Matsakis
09f431fad5 simplify and cleanup error-reporting walk code 2018-07-03 18:10:08 -04:00
Niko Matsakis
ea0224f5ab error_report: rustfmt 2018-07-03 18:10:08 -04:00
bors
fb97bb50d1 Auto merge of #51900 - PramodBisht:51813_b, r=nikomatsakis
introduce dirty list to dataflow

@nikomatsakis my naive implementation never worked, So, I decided to implement using `work_queue` data structure. This PR also includes your commits from `nll-liveness-dirty-list` branch. Those commits should not visible once your branch is merged.

r? @nikomatsakis
2018-07-03 21:48:37 +00:00
Zach Wolfe
ecaa7bc490
Update outdated comment: ByVal -> Scalar. 2018-07-03 16:09:13 -05:00
Ralf Jung
f96c246869 Strenghten synchronization in Arc::is_unique
Previously, `is_unique` would not synchronize at all with a `drop` that returned
early because it was not the last reference, leading to a data race.

Fixes #51780
2018-07-03 22:33:17 +02:00
Ethan McCue
6f223cfc07
Any docs preposition change
This changes the docs referring to where a user should be wary of depending on "Any" trait impls from warning about relying on them "outside" of their code to warning about relying on them "inside" of their code.
2018-07-03 13:13:49 -07:00
Matthew Jasper
125c9d99e5 Fix various nll unused mut errors 2018-07-03 20:12:09 +01:00
Mike Sullivan
dd069ea9f6 rust: add initial changes to support powerpc64le musl
amend powerpc64le_unknown_linux_musl.rs to fix copyright date
2018-07-03 18:18:03 +00:00
bors
739320a601 Auto merge of #51450 - estebank:inner-fn-test, r=@pnkfelix
Add lint warning for inner function marked as `#[test]`

Fix #36629.
2018-07-03 18:00:16 +00:00
QuietMisdreavus
61dc03cd63 test for renaming re-exported macros 2018-07-03 10:40:11 -05:00
Michael Woerister
65ff4141a5 Allow the linker to choose the LTO-plugin (which is useful when using LLD) 2018-07-03 16:33:11 +02:00
toidiu
3f616cb8c1 implement fix for cross crate inferrence and fix test 2018-07-03 10:13:50 -04:00
csmoe
b79a83b4e4 Suggestion for print 2018-07-03 20:39:17 +08:00
bors
860d169474 Auto merge of #52014 - pietroalbini:rollup, r=pietroalbini
Rollup of 13 pull requests

Successful merges:

 - #51548 (Initialize LLVM's AMDGPU target machine, if available.)
 - #51809 (Add read_exact_at and write_all_at methods to FileExt on unix)
 - #51914 (add outlives annotations to `BTreeMap`)
 - #51958 (Show known meta items in unknown meta items error)
 - #51973 (Make Stdio handle UnwindSafe)
 - #51977 (bootstrap: tests should use rustc from config.toml)
 - #51978 (Do not suggest changes to str literal if it isn't one)
 - #51979 (Get rid of `TyImplTraitExistential`)
 - #51980 (Emit column info in debuginfo for non msvc like targets)
 - #51982 (incr.comp.: Take names of children into account when computing the ICH of a module's HIR.)
 - #51997 (add entry for cargo-metadata feature to RELEASES)
 - #52004 (toolstate: Fixed detection of changed submodule, and other fixes.)
 - #52006 ( Change --keep-stage to apply more often)

Failed merges:

r? @ghost
2018-07-03 12:26:14 +00:00
Oliver Schneider
1eeb5dcb67 Deduplicate error reports for statics 2018-07-03 12:03:47 +02:00
Pietro Albini
492518fcd5
Rollup merge of #52006 - Mark-Simulacrum:keep-stage-fix, r=alexcrichton
Change --keep-stage to apply more often

Previously, the --keep-stage argument would only function for compilers
that were depended on by future stages. For example, if trying to build
a stage 1 compiler you could --keep-stage 0 to avoid re-building the
stage 0 compiler. However, this is often not what users want in
practice.

The new implementation essentially skips builds all higher stages of the
compiler, so an argument of 1 to keep-stage will skip rebuilds of the
libraries, just linking them into the sysroot. This is unlikely to work
well in cases where metadata or similar changes have been made, but is
likely fine otherwise.

This change is somewhat untested, but since it shouldn't have any effect
except with --keep-stage, I don't see that as a large problem.

r? @alexcrichton
cc @nikomatsakis - I believe you wanted this functionality
2018-07-03 11:31:13 +02:00
Pietro Albini
6af4397e19
Rollup merge of #52004 - kennytm:toolstate-fixes, r=Mark-Simulacrum
toolstate: Fixed detection of changed submodule, and other fixes.

1. Make sure that if a submodule is updated but failed to test-pass, we'll block the merge.
2. Make sure failure on external docs (nomicon/RBE/etc) are properly checked.
3. If the commit message starts with "Update RLS" (or clippy etc), automatically run the "tools" job on the PR, so that we could know if the update failed before merging.
2018-07-03 11:31:12 +02:00
Pietro Albini
5feb26cc55
Rollup merge of #51997 - euclio:release-notes, r=Aaronepower
add entry for cargo-metadata feature to RELEASES
2018-07-03 11:31:11 +02:00
Pietro Albini
b69058daa6
Rollup merge of #51982 - michaelwoerister:hash-modules-properly, r=nikomatsakis
incr.comp.: Take names of children into account when computing the ICH of a module's HIR.

Fixes #40876. Red-green tracking does not make this a problem anymore. We should verify this via a perf-run though.

r? @nikomatsakis
2018-07-03 11:31:10 +02:00
Pietro Albini
45cd78a4cd
Rollup merge of #51980 - est31:columns, r=alexcrichton
Emit column info in debuginfo for non msvc like targets

Fixes #42921 everywhere except MSVC. This mimics clang behaviour.
2018-07-03 11:31:09 +02:00
Pietro Albini
f91b02b769
Rollup merge of #51979 - oli-obk:lowering_cleanups4, r=nikomatsakis
Get rid of `TyImplTraitExistential`

cc @eddyb

r? @nikomatsakis
2018-07-03 11:31:07 +02:00
Pietro Albini
5195132a35
Rollup merge of #51978 - estebank:issue-48364, r=oli-obk
Do not suggest changes to str literal if it isn't one

Fix #48364.
2018-07-03 11:31:06 +02:00
Pietro Albini
47eee2497a
Rollup merge of #51977 - mnd:fix-bootstrap-test-with-local-stage0, r=simulacrum
bootstrap: tests should use rustc from config.toml

Tests should always use "rustc" and "cargo" from config.toml instead of assuming that stage0 binaries was downloaded to build directory.

Without this change `./x.py test src/bootstrap` will always try to use `build/ARCH/stage0/bin/rustc` file as compiler, but when we use local compiler to bootstrap this file does not exist.
2018-07-03 11:31:04 +02:00
Pietro Albini
0ceeb1be31
Rollup merge of #51973 - estk:master, r=abonander
Make Stdio handle UnwindSafe

Closes  #51863

This is my first compiler PR. Thanks Niko for the mentor help!

r? @nikomatsakis
2018-07-03 11:31:03 +02:00
Pietro Albini
bd0fe736be
Rollup merge of #51958 - euclio:attr-refactor, r=petrochenkov
Show known meta items in unknown meta items error

This PR adds a label to E0541. It also factors built-in attribute parsing into a submodule of `attr` for ease of future refactoring.

Fixes #51469.
2018-07-03 11:31:01 +02:00
Pietro Albini
451560e96c
Rollup merge of #51914 - nikomatsakis:nll-fix-issue-issue-btreemap-annotations, r=gankro
add outlives annotations to `BTreeMap`

NLL requires these annotations, I believe because of <https://github.com/rust-lang/rust/issues/29149>.

Fixes #48224

r? @Gankro
cc @lqd
2018-07-03 11:31:00 +02:00
Pietro Albini
a3fc979b6b
Rollup merge of #51809 - drrlvn:rw_exact_all_at, r=alexcrichton
Add read_exact_at and write_all_at methods to FileExt on unix

This PR adds `FileExt::read_exact_at()` and `FileExt::write_all_at()`, which are to `read_at()` and `write_at()` as `read_exact()` and `write_all()` are to `read()` and `write()`. This allows the user to not have to deal with `ErrorKind::Interrupted` and calling the functions in a loop.

I was unsure as to how to mark these new methods so I marked them `unstable`, please let me know if I should have done it differently.

I asked in Discord and was told that as this change is small it does not require an RFC.
2018-07-03 11:30:59 +02:00
Pietro Albini
7fa03fb511
Rollup merge of #51548 - DiamondLovesYou:amdgpu-target-machine, r=alexcrichton
Initialize LLVM's AMDGPU target machine, if available.

Note this isn't useful, yet. More changes will be necessary to be able to
actually codegen for this machine. As such, it is not enabled by default.

This patch is on its own for the benefit of the reviewers.
2018-07-03 11:30:57 +02:00
Michael Woerister
447f1f3f5c Avoid sorting the item_ids array the StableHash impl of hir::Mod. 2018-07-03 11:16:38 +02:00
jD91mZM2
ea6f9f9c55
Remove stability attributes on private types and leftover docs 2018-07-03 11:13:16 +02:00
bors
64f8ae08fd Auto merge of #51889 - spastorino:make-causal-tracking-lazy, r=nikomatsakis
Make causal tracking lazy

Closes #51710

r? @nikomatsakis
2018-07-03 09:08:58 +00:00
bors
8fa9bfeb15 Auto merge of #51695 - est31:stdsimd_update, r=alexcrichton
Update stdsimd

Closes #51691
2018-07-03 07:06:46 +00:00
bors
0fb6e3994f Auto merge of #51564 - SimonSapin:try-int, r=alexcrichton
Implement always-fallible TryFrom for usize/isize conversions that are infallible on some platforms

This reverts commit 837d6c7023 "Remove TryFrom impls that might become conditionally-infallible with a portability lint".

This fixes #49415 by adding (restoring) missing `TryFrom` impls for integer conversions to or from `usize` or `isize`, by making them always fallible at the type system level (that is, with `Error=TryFromIntError`) even though they happen to be infallible on some platforms (for some values of `size_of::<usize>()`).

They had been removed to allow the possibility to conditionally having some of them be infallible `From` impls instead, depending on the platforms, and have the [portability lint](https://github.com/rust-lang/rfcs/pull/1868) warn when they are used in code that is not already opting into non-portability. For example `#[allow(some_lint)] usize::from(x: u64)` would be valid on code that only targets 64-bit platforms.

This PR gives up on this possiblity for two reasons:

* Based on discussion with @aturon, it seems that the portability lint is not happening any time soon. It’s better to have the conversions be available *at all* than keep blocking them for so long. Portability-lint-gated platform-specific APIs can always be added separately later.

* For code that is fine with fallibility, the alternative would force it to opt into "non-portability" even though there would be no real portability issue.
2018-07-03 04:08:02 +00:00
toidiu
1c571fd17f test to capture that cross crate outlives requirements are not inferred 2018-07-02 22:25:49 -04:00
bors
81d5c3e783 Auto merge of #51428 - alexreg:uninitialized-statics-simplification, r=oli-obk
Removed `uninitialized_statics` field from `Memory` struct in miri

based on #51110

r? @oli-obk

CC @eddyb
2018-07-03 02:01:49 +00:00
bors
9078d3cdbc Auto merge of #51991 - oli-obk:clippy, r=kennytm
Update the clippy submodule

nth time is the charm? `x.py test src/tools/clippy` passes locally

r? @kennytm
2018-07-02 23:50:13 +00:00
Mark Rousskov
9eda4aabff Change --keep-stage to apply more
Previously, the --keep-stage argument would only function for compilers
that were depended on by future stages. For example, if trying to build
a stage 1 compiler you could --keep-stage 0 to avoid re-building the
stage 0 compiler. However, this is often not what users want in
practice.

The new implementation essentially skips builds all higher stages of the
compiler, so an argument of 1 to keep-stage will skip rebuilds of the
libraries, just linking them into the sysroot. This is unlikely to work
well in cases where metadata or similar changes have been made, but is
likely fine otherwise.

This change is somewhat untested, but since it shouldn't have any effect
except with --keep-stage, I don't see that as a large problem.
2018-07-02 16:12:56 -06:00
kennytm
689cffa211
Run "tools" job on PR when commit message starts with "Update RLS/miri/..." 2018-07-03 06:05:33 +08:00
kennytm
20231d774b
Fixed detection of test-fail for doctests. 2018-07-03 05:53:18 +08:00
kennytm
d91457495b
Fix the tool's path in toolstate verification.
This ensure we do block the tools when they are broken during an update.
2018-07-03 05:22:35 +08:00
Alex Crichton
c4f6f908bb Update LLVM to bring in a wasm codegen fix
Closes #51986
2018-07-02 13:55:58 -07:00
Mark Rousskov
f5570d0ef6 Make explicit that assemble is not run from CLI 2018-07-02 14:46:40 -06:00
Pramod Bisht
09df6a0aba Address #51813 2018-07-03 02:00:05 +05:30
bors
c8df60a146 Auto merge of #51944 - MajorBreakfast:generic-future-obj, r=cramertj
Make custom trait object for `Future` generic

- `TaskObj` -> `FutureObj<'static, ()>`
- The `impl From<...> for FutureObj<'a, T>` impls are impossible because of the type parameter `T`. The impl has to live in libstd, but `FutureObj<'a, T>` is from libcore. Therefore `Into<FutureObj<'a, T>>` was implemented instead. Edit: This didn‘t compile without warnings. I am now using non-generic Form impls.

See https://github.com/rust-lang-nursery/futures-rs/issues/1058

r? @cramertj

Edit: Added lifetime
2018-07-02 20:12:00 +00:00
Evan Simmons
9797665b28 Make Stdio handle UnwindSafe 2018-07-02 12:54:30 -07:00
varkor
adf4ef7b98 Use LitToConstError rather than bool for errors 2018-07-02 19:44:27 +01:00
varkor
4d66b65850 Fix issue-50585 test 2018-07-02 19:44:27 +01:00