]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoFix style nits
Dan Robertson [Mon, 18 Feb 2019 18:34:42 +0000 (18:34 +0000)]
Fix style nits

Fix style nits discovered in reading code.

5 years agoAuto merge of #58541 - kennytm:fix-publish-toolstate-py-again, r=oli-obk
bors [Mon, 18 Feb 2019 08:37:18 +0000 (08:37 +0000)]
Auto merge of #58541 - kennytm:fix-publish-toolstate-py-again, r=oli-obk

publish_toolstate.py: further fix the runtime errors

The regex was missing a `,`, causing `relevant_pr_match` to become None and set the PR number to -1 and assigned the new issue to `@<unknown user>`. This causes the 422 error when creating the issue due to invalid assignee and unable to leave the tool-is-broken comment since PR -1 does not exist.

The default user names are now also changed to @ghost to prevent the 422 error in case anything goes wrong again.

5 years agoAuto merge of #58373 - RalfJung:maybe-uninit, r=gnzlbg
bors [Mon, 18 Feb 2019 02:56:18 +0000 (02:56 +0000)]
Auto merge of #58373 - RalfJung:maybe-uninit, r=gnzlbg

update stdsimd and remove now-unused MaybeUninit::into_inner

That's a huge diff for stdsimd... Cc @gnzlbg @alexcrichton

5 years agopublish_toolstate.py: further fix the runtime errors
kennytm [Sun, 17 Feb 2019 15:19:47 +0000 (23:19 +0800)]
publish_toolstate.py: further fix the runtime errors

The regex was missing a `,`, causing `relevant_pr_match` to become None
and set the PR number to -1 and assigned the new issue to
`@<unknown user>`. This causes the 422 error when creating the issue due
to invalid assignee and unable to leave the tool-is-broken comment since
PR -1 does not exist.

The default user names are now also changed to @ghost to prevent the
422 error in case anything goes wrong again.

5 years agoAuto merge of #58416 - cuviper:dist-linux-gcc, r=alexcrichton
bors [Sun, 17 Feb 2019 14:29:33 +0000 (14:29 +0000)]
Auto merge of #58416 - cuviper:dist-linux-gcc, r=alexcrichton

[CI] Update GCC in the dist-linux builders

Upstream LLVM is planning to raise their minimum toolchain requirements, so they may start using C++14 features. This new policy has already landed in the form of a "soft" error.
http://lists.llvm.org/pipermail/llvm-dev/2019-February/130117.html

For GCC, they will require at least version 5.1. This PR moves our crosstool-ng builders to their max GCC 5.2, with a few small patches to fix compatibility. The dist-x86_64-linux builder is updated to GCC 5.5 and LLVM/Clang 8.0.0-rc2, which also affects dist-i686-linux sharing the same scripts.

r? @alexcrichton

5 years agoupdate stdsimd
Ralf Jung [Sun, 17 Feb 2019 10:22:04 +0000 (11:22 +0100)]
update stdsimd

5 years agoAuto merge of #58495 - kennytm:rollup, r=kennytm
bors [Sun, 17 Feb 2019 07:34:48 +0000 (07:34 +0000)]
Auto merge of #58495 - kennytm:rollup, r=kennytm

Rollup of 19 pull requests

Successful merges:

 - #57929 (Rustdoc remove old style files)
 - #57981 (Fix #57730)
 - #58074 (Stabilize slice_sort_by_cached_key)
 - #58196 (Add specific feature gate error for const-unstable features)
 - #58293 (Remove code for updating copyright years in generate-deriving-span-tests)
 - #58306 (Don't default on std crate when manipulating browser history)
 - #58359 (librustc_mir: use ? in impl_snapshot_for! macro)
 - #58395 (Instant::checked_duration_since)
 - #58429 (fix Box::into_unique effecitvely transmuting to a raw ptr)
 - #58433 (Update which libcore/liballoc tests Miri ignores, and document why)
 - #58438 (Use posix_spawn_file_actions_addchdir_np when possible)
 - #58440 (Whitelist the ARM v6 target-feature)
 - #58448 (rustdoc: mask `compiler_builtins` docs)
 - #58468 (split MaybeUninit into several features, expand docs a bit)
 - #58479 (compile-pass test for #53606)
 - #58489 (Fix runtime error in generate-keyword-tests)
 - #58496 (Fix documentation for std::path::PathBuf::pop)
 - #58509 (Notify myself when Clippy toolstate changes)
 - #58521 (Fix tracking issue for error iterators)

5 years agoRollup merge of #58521 - sfackler:error-iter-issue, r=withoutboats
kennytm [Sun, 17 Feb 2019 06:54:00 +0000 (14:54 +0800)]
Rollup merge of #58521 - sfackler:error-iter-issue, r=withoutboats

Fix tracking issue for error iterators

5 years agoRollup merge of #58509 - phansch:add_myself_to_clippy_toolstate_maintainers, r=oli-obk
kennytm [Sat, 16 Feb 2019 15:46:32 +0000 (23:46 +0800)]
Rollup merge of #58509 - phansch:add_myself_to_clippy_toolstate_maintainers, r=oli-obk

Notify myself when Clippy toolstate changes

5 years agoRollup merge of #58496 - nathan:doc-std-path-pathbuf-pop, r=frewsxcv
kennytm [Sat, 16 Feb 2019 15:46:10 +0000 (23:46 +0800)]
Rollup merge of #58496 - nathan:doc-std-path-pathbuf-pop, r=frewsxcv

Fix documentation for std::path::PathBuf::pop

Closes #58474.

5 years agoRollup merge of #58395 - vi:checked_duration_since, r=dtolnay
kennytm [Sat, 16 Feb 2019 06:15:45 +0000 (14:15 +0800)]
Rollup merge of #58395 - vi:checked_duration_since, r=dtolnay

Instant::checked_duration_since

5 years agoRollup merge of #57929 - GuillaumeGomez:rustodc-remove-old-style-files, r=ollie27
kennytm [Sat, 16 Feb 2019 06:15:04 +0000 (14:15 +0800)]
Rollup merge of #57929 - GuillaumeGomez:rustodc-remove-old-style-files, r=ollie27

Rustdoc remove old style files

Reopening of #56577 (which I can't seem to reopen...).

I made the flag unstable so with this change, what was blocking the PR is now gone I assume.

5 years agoRollup merge of #58489 - xfix:fix-keyword-tests-runtime-error, r=alexcrichton
kennytm [Fri, 15 Feb 2019 16:56:04 +0000 (00:56 +0800)]
Rollup merge of #58489 - xfix:fix-keyword-tests-runtime-error, r=alexcrichton

Fix runtime error in generate-keyword-tests

The script was made unusable after removing license headers.

5 years agoRollup merge of #58479 - saleemjaffer:test_promote_evaluation_unused_result, r=oli-obk
kennytm [Fri, 15 Feb 2019 16:56:03 +0000 (00:56 +0800)]
Rollup merge of #58479 - saleemjaffer:test_promote_evaluation_unused_result, r=oli-obk

compile-pass test for #53606

fixes #53606

5 years agoAuto merge of #58477 - rust-lang:fix-publish-toolstate-syntax-error, r=oli-obk
bors [Sun, 17 Feb 2019 04:57:50 +0000 (04:57 +0000)]
Auto merge of #58477 - rust-lang:fix-publish-toolstate-syntax-error, r=oli-obk

Fix the syntax error in publish_toolstate.py

5 years agoFix tracking issue for error iterators
Steven Fackler [Sat, 16 Feb 2019 20:16:18 +0000 (12:16 -0800)]
Fix tracking issue for error iterators

5 years agoNotify myself when Clippy toolstate changes
Philipp Hansch [Sat, 16 Feb 2019 10:56:32 +0000 (11:56 +0100)]
Notify myself when Clippy toolstate changes

5 years agoRollup merge of #58468 - RalfJung:maybe-uninit-split, r=Centril
kennytm [Fri, 15 Feb 2019 16:56:00 +0000 (00:56 +0800)]
Rollup merge of #58468 - RalfJung:maybe-uninit-split, r=Centril

split MaybeUninit into several features, expand docs a bit

This splits the `maybe_uninit` feature gate into several:

* `maybe_uninit` for what we will hopefully stabilize soon-ish.
* `maybe_uninit_ref` for creating references into `MaybeUninit`, for which the rules are not yet clear.
* `maybe_uninit_slice` for handling slices of `MaybeUninit`, which needs more API design work.
* `maybe_uninit_array` for creating arrays of `MaybeUninit` using a macro (because we don't have https://github.com/rust-lang/rust/issues/49147 yet).

Is that an okay thing to do? The goal is to help people avoid APIs we do not want to stabilize yet. I used this to make sure rustc itself does not use `get_ref` and `get_mut`.

I also extended the docs to advise against uninitialized integers -- again this is something for which the rules are still being discussed.

5 years agoRollup merge of #58448 - euclio:missing-summaries, r=QuietMisdreavus
kennytm [Fri, 15 Feb 2019 16:55:59 +0000 (00:55 +0800)]
Rollup merge of #58448 - euclio:missing-summaries, r=QuietMisdreavus

rustdoc: mask `compiler_builtins` docs

Fixes #46783.

I wasn't able to fully confirm the underlying cause, but my theory is that functions in `compiler_builtins` were overwriting functions with the same names in libcore in the search index. Since the functions in `compiler_builtins` didn't have docs, that's why they weren't appearing in the results.

Masking the `compiler_builtins` crate fixes the search results. It appears that this crate was accidentally unmasked in #49503.

5 years agoRollup merge of #58440 - gnzlbg:v6, r=japaric
kennytm [Fri, 15 Feb 2019 16:55:58 +0000 (00:55 +0800)]
Rollup merge of #58440 - gnzlbg:v6, r=japaric

Whitelist the ARM v6 target-feature

5 years agoRollup merge of #58438 - cuviper:posix_spawn_file_actions_addchdir_np, r=alexcrichton
kennytm [Fri, 15 Feb 2019 16:55:56 +0000 (00:55 +0800)]
Rollup merge of #58438 - cuviper:posix_spawn_file_actions_addchdir_np, r=alexcrichton

Use posix_spawn_file_actions_addchdir_np when possible

This is a non-POSIX extension implemented in Solaris and in glibc 2.29.
With this we can still use `posix_spawn()` when `Command::current_dir()`
has been set, otherwise we fallback to `fork(); chdir(); exec()`.

5 years agoRollup merge of #58433 - RalfJung:miri-mark-tests, r=TimNN
kennytm [Fri, 15 Feb 2019 16:55:55 +0000 (00:55 +0800)]
Rollup merge of #58433 - RalfJung:miri-mark-tests, r=TimNN

Update which libcore/liballoc tests Miri ignores, and document why

5 years agoRollup merge of #58429 - RalfJung:box, r=TimNN
kennytm [Fri, 15 Feb 2019 16:55:54 +0000 (00:55 +0800)]
Rollup merge of #58429 - RalfJung:box, r=TimNN

fix Box::into_unique effecitvely transmuting to a raw ptr

Miri/Stacked Borrows treat `Box` specially: they assert that it is unique, and tag it appropriately. However, currently, `Box::into_inner` is not aware of that and returns a raw pointer (wrapped in a `Unique`) that carries the same tag as the box, meaning it carries a `Uniq` tag. This leads to all sorts of problems when people use the raw pointer they get out of the `Unique` type.

In the future, it'd be interesting to make `Unique` also carry some kind of uniqueness. In that case, something like this would instead be needed whenever a raw pointer is extracted from a `Unique`. However, that is out-of-scope for the current version of Stacked Borrows. So until then, this changes `into_unique` to perform a proper reference-to-raw-ptr-cast, which clears the tag.

5 years agoRollup merge of #58359 - taiki-e:impl_snapshot_for, r=oli-obk
kennytm [Fri, 15 Feb 2019 16:55:53 +0000 (00:55 +0800)]
Rollup merge of #58359 - taiki-e:impl_snapshot_for, r=oli-obk

librustc_mir: use ? in impl_snapshot_for! macro

5 years agoRollup merge of #58306 - GuillaumeGomez:crate-browser-history, r=QuietMisdreavus
kennytm [Fri, 15 Feb 2019 16:55:51 +0000 (00:55 +0800)]
Rollup merge of #58306 - GuillaumeGomez:crate-browser-history, r=QuietMisdreavus

Don't default on std crate when manipulating browser history

Fixes #58263.

r? @QuietMisdreavus

5 years agoRollup merge of #58293 - xfix:patch-16, r=Mark-Simulacrum
kennytm [Fri, 15 Feb 2019 16:55:50 +0000 (00:55 +0800)]
Rollup merge of #58293 - xfix:patch-16, r=Mark-Simulacrum

Remove code for updating copyright years in generate-deriving-span-tests

It's no longer necessary, as there is no license header anymore.

5 years agoRollup merge of #58196 - varkor:const-fn-feature-gate-error, r=oli-obk
kennytm [Fri, 15 Feb 2019 16:55:49 +0000 (00:55 +0800)]
Rollup merge of #58196 - varkor:const-fn-feature-gate-error, r=oli-obk

Add specific feature gate error for const-unstable features

Before:
```
error: `impl Trait` in const fn is unstable
 --> src/lib.rs:7:19
  |
7 | const fn foo() -> impl T {
  |                   ^^^^^^

error: aborting due to previous error
```

After:
```
error[E0723]: `impl Trait` in const fn is unstable (see issue #57563)
 --> src/lib.rs:7:19
  |
7 | const fn foo() -> impl T {
  |                   ^^^^^^
  = help: add #![feature(const_fn)] to the crate attributes to enable

error: aborting due to previous error
```

This improves the situation with https://github.com/rust-lang/rust/issues/57563. Fixes https://github.com/rust-lang/rust/issues/57544. Fixes https://github.com/rust-lang/rust/issues/54469.

r? @oli-obk

5 years agoRollup merge of #58074 - scottmcm:stabilize-sort_by_cached_key, r=SimonSapin
kennytm [Fri, 15 Feb 2019 16:55:47 +0000 (00:55 +0800)]
Rollup merge of #58074 - scottmcm:stabilize-sort_by_cached_key, r=SimonSapin

Stabilize slice_sort_by_cached_key

I was going to ask on the tracking issue (https://github.com/rust-lang/rust/issues/34447), but decided to just send this and hope for an FCP here.  The method was added last March by https://github.com/rust-lang/rust/pull/48639.

Signature: https://doc.rust-lang.org/std/primitive.slice.html#method.sort_by_cached_key
```rust
impl [T] {
    pub fn sort_by_cached_key<K, F>(&mut self, f: F)
        where F: FnMut(&T) -> K, K: Ord;
}
```

That's an identical signature to the existing `sort_by_key`, so I think the questions are just naming, implementation, and the usual "do we want this?".

The implementation seems to have proven its use in rustc at least, which many uses: https://github.com/rust-lang/rust/search?l=Rust&q=sort_by_cached_key

(I'm asking because it's exactly what I just needed the other day:
```rust
    all_positions.sort_by_cached_key(|&n|
        data::CITIES.iter()
            .map(|x| *metric_closure.get_edge(n, x.pos).unwrap())
            .sum::<usize>()
    );
```
since caching that key is a pretty obviously good idea.)

Closes #34447

5 years agoRollup merge of #57981 - Zoxc:fix-57979, r=nikomatsakis
kennytm [Fri, 15 Feb 2019 16:55:46 +0000 (00:55 +0800)]
Rollup merge of #57981 - Zoxc:fix-57979, r=nikomatsakis

Fix #57730

cc https://github.com/rust-lang/rust/pull/57730

r? @cramertj

5 years agoAuto merge of #57880 - Zoxc:error-on-cycle, r=michaelwoerister
bors [Fri, 15 Feb 2019 22:22:10 +0000 (22:22 +0000)]
Auto merge of #57880 - Zoxc:error-on-cycle, r=michaelwoerister

Always emit an error for a query cycle

r? @michaelwoerister

cc @nikomatsakis @wesleywiser

5 years agoFix documentation for std::path::PathBuf::pop
Nathan [Fri, 15 Feb 2019 17:19:15 +0000 (12:19 -0500)]
Fix documentation for std::path::PathBuf::pop

Closes #58474.

5 years agoAuto merge of #58406 - Disasm:rv64-support, r=nagisa
bors [Fri, 15 Feb 2019 16:20:12 +0000 (16:20 +0000)]
Auto merge of #58406 - Disasm:rv64-support, r=nagisa

Add riscv64{imac,gc}-unknown-none-elf targets

Previous attempt by @fintelia: https://github.com/rust-lang/rust/pull/58012

Related: https://github.com/rust-embedded/wg/issues/218

5 years agoFix runtime error in generate-keyword-tests
Konrad Borowski [Fri, 15 Feb 2019 13:48:21 +0000 (14:48 +0100)]
Fix runtime error in generate-keyword-tests

The script was made unusable after removing license headers.

5 years agoAuto merge of #58403 - eddyb:requalify, r=oli-obk
bors [Fri, 15 Feb 2019 12:15:17 +0000 (12:15 +0000)]
Auto merge of #58403 - eddyb:requalify, r=oli-obk

rustc_mir: split qualify_consts' "value qualification" bitflags into separate computations.

Prerequisite for computing those bits through a dataflow algorithm ~~(which I might do in this PR later)~~.

This PR should not change behavior overall, other than treating `simd_shuffle*` identically to `#[rustc_args_required_const]` (maybe we should just have `#[rustc_args_required_const]` on the intrinsic imports of `simd_shuffle*`? cc @gnzlbg)

cc @oli-obk @alexreg

5 years agocompile-pass test for #53606
Saleem Jaffer [Fri, 15 Feb 2019 08:52:17 +0000 (14:22 +0530)]
compile-pass test for #53606

5 years agoFix the syntax error in publish_toolstate.py
kennytm [Fri, 15 Feb 2019 06:26:27 +0000 (14:26 +0800)]
Fix the syntax error in publish_toolstate.py

5 years agoRemove `stolen`
John Kåre Alsaker [Wed, 13 Feb 2019 12:13:08 +0000 (13:13 +0100)]
Remove `stolen`

5 years agoAlways emit an error for a query cycle
John Kåre Alsaker [Thu, 24 Jan 2019 19:05:19 +0000 (20:05 +0100)]
Always emit an error for a query cycle

5 years agomake Centril happy
Ralf Jung [Thu, 14 Feb 2019 21:31:06 +0000 (22:31 +0100)]
make Centril happy

5 years agoWhitelist the ARM v8 target-feature
gnzlbg [Thu, 14 Feb 2019 21:00:33 +0000 (22:00 +0100)]
Whitelist the ARM v8 target-feature

5 years agosplit MaybeUninit into several features, expand docs a bit
Ralf Jung [Thu, 14 Feb 2019 19:00:16 +0000 (20:00 +0100)]
split MaybeUninit into several features, expand docs a bit

5 years agoAdd updated NLL tests
varkor [Thu, 14 Feb 2019 15:47:37 +0000 (15:47 +0000)]
Add updated NLL tests

5 years agoadd .stderr file
Niko Matsakis [Thu, 14 Feb 2019 15:26:02 +0000 (10:26 -0500)]
add .stderr file

5 years agoremove MaybeUninit::into_inner
Ralf Jung [Thu, 14 Feb 2019 15:21:21 +0000 (16:21 +0100)]
remove MaybeUninit::into_inner

5 years agoupdate stdsimd
Ralf Jung [Tue, 12 Feb 2019 08:01:49 +0000 (09:01 +0100)]
update stdsimd

5 years agofixed for libstd build
Ralf Jung [Mon, 11 Feb 2019 21:00:10 +0000 (22:00 +0100)]
fixed for libstd build

5 years agoadd missing feature flag
Ralf Jung [Mon, 11 Feb 2019 14:29:25 +0000 (15:29 +0100)]
add missing feature flag

5 years agoupdate stdsimd
Ralf Jung [Mon, 11 Feb 2019 14:24:38 +0000 (15:24 +0100)]
update stdsimd

5 years agoFix documentation typo
varkor [Tue, 5 Feb 2019 21:03:01 +0000 (22:03 +0100)]
Fix documentation typo

5 years agoUpdate const fn tests
varkor [Tue, 5 Feb 2019 20:27:44 +0000 (21:27 +0100)]
Update const fn tests

5 years agoAdd specific error for unstable const fn features
varkor [Tue, 5 Feb 2019 20:27:26 +0000 (21:27 +0100)]
Add specific error for unstable const fn features

5 years agorustc_mir: compute all the qualification bits separately in qualify_consts.
Eduard-Mihai Burtescu [Wed, 6 Feb 2019 15:18:42 +0000 (17:18 +0200)]
rustc_mir: compute all the qualification bits separately in qualify_consts.

5 years agorustc_mir: rename qualify_consts::Qualifier to ConstCx and keep in Checker as a field.
Eduard-Mihai Burtescu [Thu, 7 Feb 2019 01:45:37 +0000 (03:45 +0200)]
rustc_mir: rename qualify_consts::Qualifier to ConstCx and keep in Checker as a field.

5 years agorustc_mir: do not treat NEEDS_DROP as unexpected in qualify_consts.
Eduard-Mihai Burtescu [Wed, 6 Feb 2019 16:11:48 +0000 (18:11 +0200)]
rustc_mir: do not treat NEEDS_DROP as unexpected in qualify_consts.

5 years agorustc_mir: avoid having an Option around each local qualification in qualify_consts.
Eduard-Mihai Burtescu [Wed, 6 Feb 2019 01:08:43 +0000 (03:08 +0200)]
rustc_mir: avoid having an Option around each local qualification in qualify_consts.

5 years agorustc_mir: rename `Qualif::for_ty to `Qualif::any_value_of_ty`.
Eduard-Mihai Burtescu [Tue, 5 Feb 2019 17:46:43 +0000 (19:46 +0200)]
rustc_mir: rename `Qualif::for_ty to `Qualif::any_value_of_ty`.

5 years agorustc_mir: remove qualify_consts::Qualif::FN_ARGUMENT.
Eduard-Mihai Burtescu [Tue, 5 Feb 2019 11:24:49 +0000 (13:24 +0200)]
rustc_mir: remove qualify_consts::Qualif::FN_ARGUMENT.

5 years agorustc_mir: remove outdated `const fn` stability diagnostic.
Eduard-Mihai Burtescu [Tue, 5 Feb 2019 10:45:15 +0000 (12:45 +0200)]
rustc_mir: remove outdated `const fn` stability diagnostic.

5 years agorustc_mir: split qualify_consts' checking and value qualification.
Eduard-Mihai Burtescu [Tue, 5 Feb 2019 08:37:28 +0000 (10:37 +0200)]
rustc_mir: split qualify_consts' checking and value qualification.

5 years agorustc_mir: split off some qualify_consts::Checker fields into a State struct.
Eduard-Mihai Burtescu [Mon, 4 Feb 2019 21:24:20 +0000 (23:24 +0200)]
rustc_mir: split off some qualify_consts::Checker fields into a State struct.

5 years agorustc_mir: rename qualify_consts::Qualifier to Checker.
Eduard-Mihai Burtescu [Sat, 29 Sep 2018 08:56:26 +0000 (11:56 +0300)]
rustc_mir: rename qualify_consts::Qualifier to Checker.

5 years agoAuto merge of #58455 - Centril:rollup, r=Centril
bors [Thu, 14 Feb 2019 10:32:25 +0000 (10:32 +0000)]
Auto merge of #58455 - Centril:rollup, r=Centril

Rollup of 7 pull requests

Successful merges:

 - #58309 (Add more profiler events)
 - #58347 (Closure bounds fixes)
 - #58365 (Add an option to print the status of incremental tasks / dep nodes after running them)
 - #58371 (Check user type annotations for range patterns.)
 - #58378 (rustc: Implement incremental "fat" LTO)
 - #58407 (specify "upper camel case" in style lint)
 - #58449 (Notify @topecongiro when the state of rustfmt has changed)

Failed merges:

r? @ghost

5 years agoRollup merge of #58449 - topecongiro:rustfmt-toolstate, r=Centril
Mazdak Farrokhzad [Thu, 14 Feb 2019 07:24:18 +0000 (08:24 +0100)]
Rollup merge of #58449 - topecongiro:rustfmt-toolstate, r=Centril

Notify @topecongiro when the state of rustfmt has changed

I would like to get notified when the state of rustfmt has changed.
Context: I am currently a leader of the rustfmt working group.

cc @nrc do you still want to get notified?

5 years agoRollup merge of #58407 - euclio:upper-camel-case, r=estebank
Mazdak Farrokhzad [Thu, 14 Feb 2019 07:24:17 +0000 (08:24 +0100)]
Rollup merge of #58407 - euclio:upper-camel-case, r=estebank

specify "upper camel case" in style lint

Also, fix an issue where internal upper case letters were converted to
lower case.

Fixes #57319.

5 years agoRollup merge of #58378 - alexcrichton:incremental-lto, r=michaelwoerister
Mazdak Farrokhzad [Thu, 14 Feb 2019 07:24:15 +0000 (08:24 +0100)]
Rollup merge of #58378 - alexcrichton:incremental-lto, r=michaelwoerister

rustc: Implement incremental "fat" LTO

Currently the compiler will produce an error if both incremental
compilation and full fat LTO is requested. With recent changes and the
advent of incremental ThinLTO, however, all the hard work is already
done for us and it's actually not too bad to remove this error!

This commit updates the codegen backend to allow incremental full fat
LTO. The semantics are that the input modules to LTO are all produce
incrementally, but the final LTO step is always done unconditionally
regardless of whether the inputs changed or not. The only real
incremental win we could have here is if zero of the input modules
changed, but that's so rare it's unlikely to be worthwhile to implement
such a code path.

cc #57968
cc rust-lang/cargo#6643

5 years agoRollup merge of #58371 - davidtwco:issue-58299, r=arielb1
Mazdak Farrokhzad [Thu, 14 Feb 2019 07:24:14 +0000 (08:24 +0100)]
Rollup merge of #58371 - davidtwco:issue-58299, r=arielb1

Check user type annotations for range patterns.

Fixes #58299.

This PR builds on the fix from #58161 (which fixed miscompilation
caused by the introduction of `AscribeUserType` patterns for associated
constants) to start checking these patterns are well-formed for ranges
(previous fix just ignored them so that miscompilation wouldn't occur).

r? @arielb1

5 years agoRollup merge of #58365 - Zoxc:task-status, r=michaelwoerister
Mazdak Farrokhzad [Thu, 14 Feb 2019 07:24:13 +0000 (08:24 +0100)]
Rollup merge of #58365 - Zoxc:task-status, r=michaelwoerister

Add an option to print the status of incremental tasks / dep nodes after running them

r? @michaelwoerister

5 years agoRollup merge of #58347 - matthewjasper:closure-bounds-fixes, r=pnkfelix
Mazdak Farrokhzad [Thu, 14 Feb 2019 07:24:12 +0000 (08:24 +0100)]
Rollup merge of #58347 - matthewjasper:closure-bounds-fixes, r=pnkfelix

Closure bounds fixes

* Ensures that "nice region errors" are buffered so that they are sorted and migrated correctly.
* Propagates fewer constraints for closures (cc #58178)
* Propagate constraints from closures more precisely (#58127)

Closes #58127

r? @nikomatsakis

5 years agoRollup merge of #58309 - wesleywiser:add_more_profiler_events, r=michaelwoerister
Mazdak Farrokhzad [Thu, 14 Feb 2019 07:24:10 +0000 (08:24 +0100)]
Rollup merge of #58309 - wesleywiser:add_more_profiler_events, r=michaelwoerister

Add more profiler events

- Adds Start\Stop events for time spent loading incremental query results from disk.

- Adds Start\Stop events for time spent blocked waiting for queries to complete (when parallel queries are enabled).

r? @michaelwoerister

5 years agoAuto merge of #58446 - Centril:rollup, r=Centril
bors [Thu, 14 Feb 2019 04:22:35 +0000 (04:22 +0000)]
Auto merge of #58446 - Centril:rollup, r=Centril

Rollup of 8 pull requests

Successful merges:

 - #57451 (suggestion-diagnostics: as_ref improve snippet)
 - #57856 (Convert old first edition links to current edition one)
 - #57992 (Update the future/task API)
 - #58258 (Reduce the size of `hir::Expr`.)
 - #58267 (Tweak "incompatible match arms" error)
 - #58296 (Hidden suggestion support)
 - #58301 (Enable comparing fat pointers)
 - #58308 (Extract block to insert an intrinsic into its own function)

Failed merges:

r? @ghost

5 years agoNotify @topecongiro when the state of rustfmt has changed
topecongiro [Thu, 14 Feb 2019 02:11:05 +0000 (11:11 +0900)]
Notify @topecongiro when the state of rustfmt has changed

5 years agoRollup merge of #58308 - gnzlbg:context_insert_intr, r=eddyb
Mazdak Farrokhzad [Thu, 14 Feb 2019 01:41:24 +0000 (02:41 +0100)]
Rollup merge of #58308 - gnzlbg:context_insert_intr, r=eddyb

Extract block to insert an intrinsic into its own function

r? @eddyb

5 years agoRollup merge of #58301 - RalfJung:fat-ptr-eq, r=oli-obk
Mazdak Farrokhzad [Thu, 14 Feb 2019 01:41:23 +0000 (02:41 +0100)]
Rollup merge of #58301 - RalfJung:fat-ptr-eq, r=oli-obk

Enable comparing fat pointers

Also refactor our binops a bit to make that happen more easily.

r? @oli-obk

5 years agoRollup merge of #58296 - estebank:hidden-suggestion, r=oli-obk
Mazdak Farrokhzad [Thu, 14 Feb 2019 01:41:21 +0000 (02:41 +0100)]
Rollup merge of #58296 - estebank:hidden-suggestion, r=oli-obk

Hidden suggestion support

Add way to hide suggestion snippet window from cli output to avoid cluttered spans that don't enhance understanding.

r? @pietroalbini CC @zackmdavis

5 years agoRollup merge of #58267 - estebank:match-arms, r=matthewjasper
Mazdak Farrokhzad [Thu, 14 Feb 2019 01:41:20 +0000 (02:41 +0100)]
Rollup merge of #58267 - estebank:match-arms, r=matthewjasper

Tweak "incompatible match arms" error

- Point at the body expression of the match arm with the type error.
- Point at the prior match arms explicitly stating the evaluated type.
- Point at the entire match expr in a secondary span, instead of primary.
- For type errors in the first match arm, the cause is outside of the
  match, treat as implicit block error to give a more appropriate error.

Fix #46776, fix #57206.
CC #24157, #38234.

5 years agoRollup merge of #58258 - nnethercote:shrink-hir-Expr, r=michaelwoerister
Mazdak Farrokhzad [Thu, 14 Feb 2019 01:41:19 +0000 (02:41 +0100)]
Rollup merge of #58258 - nnethercote:shrink-hir-Expr, r=michaelwoerister

Reduce the size of `hir::Expr`.

From 104 bytes to 72 bytes on x86-64. This slightly reduces instruction
counts.

Also add an assertion about the size.

5 years agoRollup merge of #57992 - Matthias247:waker4, r=cramertj
Mazdak Farrokhzad [Thu, 14 Feb 2019 01:41:17 +0000 (02:41 +0100)]
Rollup merge of #57992 - Matthias247:waker4, r=cramertj

Update the future/task API

This change updates the future and task API as discussed in the stabilization RFC at https://github.com/rust-lang/rfcs/pull/2592.

Changes:
- Replacing UnsafeWake with RawWaker and RawWakerVtable
- Removal of LocalWaker
- Removal of Arc-based Wake trait

5 years agoRollup merge of #57856 - lzutao:fix-old-first-edition, r=steveklabnik
Mazdak Farrokhzad [Thu, 14 Feb 2019 01:41:16 +0000 (02:41 +0100)]
Rollup merge of #57856 - lzutao:fix-old-first-edition, r=steveklabnik

Convert old first edition links to current edition one

r? @steveklabnik

5 years agoRollup merge of #57451 - dlrobertson:can_use_as_ref_nit, r=estebank
Mazdak Farrokhzad [Thu, 14 Feb 2019 01:41:15 +0000 (02:41 +0100)]
Rollup merge of #57451 - dlrobertson:can_use_as_ref_nit, r=estebank

suggestion-diagnostics: as_ref improve snippet

Improve the code snippet suggested in suggestion-diagnostics when
suggesting the use of as_ref.

Given:

```rust
fn test(x: &usize) {}
fn main() {
    Some(42).map(|x| test(x));
}
```

Suggest

```
  help: consider using `as_ref` instead: `as_ref().map`
```

Instead of

```
  help: consider using `as_ref` instead: `as_ref().`
```

5 years agomask `compiler_builtins` docs
Andy Russell [Thu, 14 Feb 2019 00:57:12 +0000 (19:57 -0500)]
mask `compiler_builtins` docs

Since `compiler_builtins` is being injected automatically, its docs
aren't masked. This commit masks the crate's docs if it's brought in as
an extern crate.

5 years agoReduce the size of `hir::Expr`.
Nicholas Nethercote [Thu, 7 Feb 2019 05:03:57 +0000 (16:03 +1100)]
Reduce the size of `hir::Expr`.

From 104 bytes to 72 bytes on x86-64. This slightly reduces instruction
counts.

Also add an assertion about the size.

5 years agoAuto merge of #58432 - Centril:rollup, r=Centril
bors [Wed, 13 Feb 2019 22:23:09 +0000 (22:23 +0000)]
Auto merge of #58432 - Centril:rollup, r=Centril

Rollup of 10 pull requests

Successful merges:

 - #58110 (libpanic_unwind => 2018)
 - #58167 (HirId-ify hir::BodyId)
 - #58202 (Ignore future deprecations in #[deprecated])
 - #58272 (Cut down on number formating code size)
 - #58276 (Improve the error messages for missing stability attributes)
 - #58354 (Fix ICE and invalid filenames in MIR printing code)
 - #58381 (Only suggest imports if not imported.)
 - #58386 (Fix #54242)
 - #58400 (Fix rustc_driver swallowing errors when compilation is stopped)
 - #58420 (target/uefi: clarify documentation)

Failed merges:

r? @ghost

5 years agoWhitelist the ARM v6 target-feature
gnzlbg [Wed, 13 Feb 2019 21:29:27 +0000 (22:29 +0100)]
Whitelist the ARM v6 target-feature

5 years agoUse posix_spawn_file_actions_addchdir_np when possible
Josh Stone [Wed, 13 Feb 2019 20:20:23 +0000 (12:20 -0800)]
Use posix_spawn_file_actions_addchdir_np when possible

This is a non-POSIX extension implemented in Solaris and in glibc 2.29.
With this we can still use `posix_spawn()` when `Command::current_dir()`
has been set, otherwise we fallback to `fork(); chdir(); exec()`.

5 years agoPropagate region constraints more precisely from closures
Matthew Jasper [Wed, 6 Feb 2019 13:13:01 +0000 (14:13 +0100)]
Propagate region constraints more precisely from closures

5 years agoBuffer and migrate nice region errors
Matthew Jasper [Wed, 6 Feb 2019 13:11:09 +0000 (14:11 +0100)]
Buffer and migrate nice region errors

5 years agoAvoid propagating redundant outlives constraints from closures
Matthew Jasper [Sun, 10 Feb 2019 09:53:52 +0000 (09:53 +0000)]
Avoid propagating redundant outlives constraints from closures

5 years agospecify "upper camel case" in style lint
Andy Russell [Tue, 12 Feb 2019 17:35:38 +0000 (12:35 -0500)]
specify "upper camel case" in style lint

Also, fix an issue where internal upper case letters were converted to
lower case.

5 years agosuggestion-diagnostics: as_ref improve snippet
Dan Robertson [Wed, 13 Feb 2019 17:52:22 +0000 (17:52 +0000)]
suggestion-diagnostics: as_ref improve snippet

Improve the code snippet suggested in suggestion-diagnostics when
suggesting the use of as_ref.

5 years agomiri: test with slightly larger BTrees
Ralf Jung [Wed, 13 Feb 2019 17:11:57 +0000 (18:11 +0100)]
miri: test with slightly larger BTrees

5 years agoreview failures in heap, slice, vec
Ralf Jung [Wed, 13 Feb 2019 16:49:11 +0000 (17:49 +0100)]
review failures in heap, slice, vec

5 years agoreview failures in btree, string
Ralf Jung [Wed, 13 Feb 2019 16:18:47 +0000 (17:18 +0100)]
review failures in btree, string

5 years agoreview failures in binary_heap, str, vec_deque
Ralf Jung [Wed, 13 Feb 2019 12:59:51 +0000 (13:59 +0100)]
review failures in binary_heap, str, vec_deque

5 years agothe formatting issue got fixed
Ralf Jung [Wed, 13 Feb 2019 12:25:46 +0000 (13:25 +0100)]
the formatting issue got fixed

5 years agoreview or fix remaining miri failures in libcore
Ralf Jung [Sat, 9 Feb 2019 15:19:21 +0000 (16:19 +0100)]
review or fix remaining miri failures in libcore

5 years agoRollup merge of #58420 - dvdhrm:target-uefi-comments, r=nagisa
Mazdak Farrokhzad [Wed, 13 Feb 2019 17:12:39 +0000 (18:12 +0100)]
Rollup merge of #58420 - dvdhrm:target-uefi-comments, r=nagisa

target/uefi: clarify documentation

This clarifies why FP-units are disabled on UEFI targets, as well as
why we must opt into the NXCOMPAT feature.

I did find some time to investigate why GRUB and friends disable FP on
UEFI. The specification explicitly allows using MMX/SSE/AVX, but as it
turns out it does not mandate enabling the instruction sets explicitly.
Hence, any use of these instructions will trigger CPU exceptions,
unless an application explicitly enables them (which is not an option,
as these are global flags that better be controlled by the
kernel/firmware).

Furthermore, UEFI systems are allowed to mark any non-code page as
non-executable. Hence, we must make sure to never place code on the
stack or heap. So we better pass /NXCOMPAT to the linker for it to
complain if it ever places code in non-code pages.

Lastly, this fixes some typos in related comments.

r? @alexcrichton

5 years agoRollup merge of #58400 - gnzlbg:fix_driver, r=oli-obk
Mazdak Farrokhzad [Wed, 13 Feb 2019 17:12:37 +0000 (18:12 +0100)]
Rollup merge of #58400 - gnzlbg:fix_driver, r=oli-obk

Fix rustc_driver swallowing errors when compilation is stopped

r? @oli-obk

5 years agoRollup merge of #58386 - Zoxc:fix-54242, r=michaelwoerister
Mazdak Farrokhzad [Wed, 13 Feb 2019 17:12:36 +0000 (18:12 +0100)]
Rollup merge of #58386 - Zoxc:fix-54242, r=michaelwoerister

Fix #54242

r? @michaelwoerister

5 years agoRollup merge of #58381 - davidtwco:issue-42944, r=estebank
Mazdak Farrokhzad [Wed, 13 Feb 2019 17:12:35 +0000 (18:12 +0100)]
Rollup merge of #58381 - davidtwco:issue-42944, r=estebank

Only suggest imports if not imported.

Fixes #42944 and fixes #53430.

This commit modifies name resolution error reporting so that if a name
is in scope and has been imported then we do not suggest importing it.

This can occur when we add a label about constructors not being visible
due to private fields. In these cases, we know that the struct/variant
has been imported and we should silence any suggestions to import the
struct/variant.

r? @estebank

5 years agoRollup merge of #58354 - matthewjasper:mir-dump-fixes, r=wesleywiser
Mazdak Farrokhzad [Wed, 13 Feb 2019 17:12:34 +0000 (18:12 +0100)]
Rollup merge of #58354 - matthewjasper:mir-dump-fixes, r=wesleywiser

Fix ICE and invalid filenames in MIR printing code

* Don't panic when printing MIR for associated constants
* Don't use `<` and `>` in filenames, since they aren't allowed on Windows.

r? @eddyb

cc @RalfJung