]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoAdd regression test for #66596
varkor [Wed, 8 Apr 2020 23:57:27 +0000 (00:57 +0100)]
Add regression test for #66596

4 years agoAuto merge of #70931 - Dylan-DPC:rollup-f8orcao, r=Dylan-DPC
bors [Wed, 8 Apr 2020 17:55:45 +0000 (17:55 +0000)]
Auto merge of #70931 - Dylan-DPC:rollup-f8orcao, r=Dylan-DPC

Rollup of 9 pull requests

Successful merges:

 - #70789 (remove false positives of unused_braces)
 - #70847 (ci: move /var/lib/docker to /mnt on GHA)
 - #70850 (BTreeMap first last proposal tweaks)
 - #70876 (Use a `SmallVec` for `Cache::predecessors`.)
 - #70883 (Clean up E0507 explanation)
 - #70892 (wf: refactor `compute_trait_ref`)
 - #70914 (Corrects a typo in rustdoc documentation.)
 - #70915 (Remove unnecessary TypeFlags::NOMINAL_FLAGS)
 - #70927 (Clean up E0510 explanation)

Failed merges:

r? @ghost

4 years agoRollup merge of #70927 - GuillaumeGomez:cleanup-e0510, r=Dylan-DPC
Dylan DPC [Wed, 8 Apr 2020 16:37:31 +0000 (18:37 +0200)]
Rollup merge of #70927 - GuillaumeGomez:cleanup-e0510, r=Dylan-DPC

Clean up E0510 explanation

r? @Dylan-DPC

4 years agoRollup merge of #70915 - tsandstr:remove-nominal-flags, r=eddyb
Dylan DPC [Wed, 8 Apr 2020 16:37:30 +0000 (18:37 +0200)]
Rollup merge of #70915 - tsandstr:remove-nominal-flags, r=eddyb

Remove unnecessary TypeFlags::NOMINAL_FLAGS

This was a relic from when we had "nominal flags" and "cached
properties." The latter no longer exists, so nominal flags are no
longer necessary. In fact, every flag is considered a nominal flag. I
went ahead and removed all references to NOMINAL_FLAGS.

Fixes rust-lang#70836

4 years agoRollup merge of #70914 - tsandstr:typo1, r=Dylan-DPC
Dylan DPC [Wed, 8 Apr 2020 16:37:28 +0000 (18:37 +0200)]
Rollup merge of #70914 - tsandstr:typo1, r=Dylan-DPC

Corrects a typo in rustdoc documentation.

Fixes rust-lang#70856

Sorry, I am just learning git and I think I may have accidentally done some wacky stuff that closed my last PR. Here it is again.

4 years agoRollup merge of #70892 - lcnr:interators_are_nice, r=nikomatsakis
Dylan DPC [Wed, 8 Apr 2020 16:37:27 +0000 (18:37 +0200)]
Rollup merge of #70892 - lcnr:interators_are_nice, r=nikomatsakis

wf: refactor `compute_trait_ref`

moves `extend_cause_with_original_assoc_item_obligation` out of `compute_trait_ref` and
changes `trait_assoc_items` to an iterator. This saves us from building an unnecessary `Vec<_>`

r? @eddyb i guess

4 years agoRollup merge of #70883 - GuillaumeGomez:cleanup-e0507, r=Dylan-DPC
Dylan DPC [Wed, 8 Apr 2020 16:37:25 +0000 (18:37 +0200)]
Rollup merge of #70883 - GuillaumeGomez:cleanup-e0507, r=Dylan-DPC

Clean up E0507 explanation

r? @Dylan-DPC

4 years agoRollup merge of #70876 - nnethercote:smallvec-predecessors, r=estebank
Dylan DPC [Wed, 8 Apr 2020 16:37:24 +0000 (18:37 +0200)]
Rollup merge of #70876 - nnethercote:smallvec-predecessors, r=estebank

Use a `SmallVec` for `Cache::predecessors`.

This is a very small win.

4 years agoRollup merge of #70850 - ssomers:btreemap_first_last, r=Amanieu
Dylan DPC [Wed, 8 Apr 2020 16:37:22 +0000 (18:37 +0200)]
Rollup merge of #70850 - ssomers:btreemap_first_last, r=Amanieu

BTreeMap first last proposal tweaks

Clean-up and following up on a request in #62924.

Trying the reviewer of the original code #65637...
r? @scottmcm

4 years agoRollup merge of #70847 - pietroalbini:ci-move-docker-lib, r=Mark-Simulacrum
Dylan DPC [Wed, 8 Apr 2020 16:37:18 +0000 (18:37 +0200)]
Rollup merge of #70847 - pietroalbini:ci-move-docker-lib, r=Mark-Simulacrum

ci: move /var/lib/docker to /mnt on GHA

There are some builders that are running out of disk space while building the Docker images, such as arm-android. This moves and symlinks `/var/lib/docker` to the `/mnt` partition on Linux GHA.

Example of a build failing because of this: https://github.com/rust-lang-ci/rust/runs/564628621

4 years agoRollup merge of #70789 - lcnr:macros, r=varkor
Dylan DPC [Wed, 8 Apr 2020 16:37:16 +0000 (18:37 +0200)]
Rollup merge of #70789 - lcnr:macros, r=varkor

remove false positives of unused_braces

fixes #70717

We could potentially be more aggressive when linting let bindings by checking if there are any explicit `ref`s.
I have been unable to create a snippet which compiles when using braces but has a borrowck error
without them. The closes I've gotten is [the following (playground)](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=4a1552ebe9648cb13fcb8dd969189a6c).

r? @eddyb

4 years agoClean up E0510 explanation
Guillaume Gomez [Wed, 8 Apr 2020 13:05:52 +0000 (15:05 +0200)]
Clean up E0510 explanation

4 years agoRemove unnecessary TypeFlags::NOMINAL_FLAGS
Theo Sandstrom [Wed, 8 Apr 2020 01:57:31 +0000 (21:57 -0400)]
Remove unnecessary TypeFlags::NOMINAL_FLAGS

This was a relic from when we had "nominal flags" and "cached
properties." The latter no longer exists, so nominal flags are no
longer necessary. In fact, every flag is considered a nominal flag. I
went ahead and removed all references to NOMINAL_FLAGS.

Fixes rust-lang#70836

4 years agoCorrects a typo in rustdoc documentation.
Theo Sandstrom [Tue, 7 Apr 2020 22:23:49 +0000 (18:23 -0400)]
Corrects a typo in rustdoc documentation.

Fixes rust-lang#70856

4 years agoremove false positives of unused_braces
Bastian Kauschke [Sat, 4 Apr 2020 20:40:31 +0000 (22:40 +0200)]
remove false positives of unused_braces

4 years agowf: refactor `compute_trait_ref`
Bastian Kauschke [Tue, 7 Apr 2020 15:49:02 +0000 (17:49 +0200)]
wf: refactor `compute_trait_ref`

4 years agoAuto merge of #70884 - Dylan-DPC:rollup-r3raqdf, r=jonas-schievink
bors [Tue, 7 Apr 2020 13:43:30 +0000 (13:43 +0000)]
Auto merge of #70884 - Dylan-DPC:rollup-r3raqdf, r=jonas-schievink

Rollup of 5 pull requests

Successful merges:

 - #70201 (Small tweaks in ToOwned::clone_into)
 - #70762 (Miri leak check: memory reachable through globals is not leaked)
 - #70846 (Keep codegen units unmerged when building compiler builtins)
 - #70854 (Use assoc int submodules)
 - #70857 (Don't import integer and float modules, use assoc consts 2)

Failed merges:

r? @ghost

4 years agoRollup merge of #70857 - faern:use-assoc-int-float-consts, r=dtolnay
Dylan DPC [Tue, 7 Apr 2020 12:46:59 +0000 (14:46 +0200)]
Rollup merge of #70857 - faern:use-assoc-int-float-consts, r=dtolnay

Don't import integer and float modules, use assoc consts 2

Follow up to #70777. I missed quite a lot of places. Partially because I wanted to keep the size of the last PR down, and partially because my regexes were not good enough :)

r? @dtolnay

4 years agoRollup merge of #70854 - faern:use-assoc-int-submodules, r=dtolnay
Dylan DPC [Tue, 7 Apr 2020 12:46:58 +0000 (14:46 +0200)]
Rollup merge of #70854 - faern:use-assoc-int-submodules, r=dtolnay

Use assoc int submodules

Bumping some submodules to the commits their masters currently point at. The main point of this is to get the associated integer/float constant documentation updates that were recently merged to them:

* https://github.com/rust-lang/nomicon/pull/207
* https://github.com/rust-lang/rust-by-example/pull/1327
* https://github.com/rust-lang/stdarch/pull/848

But for some, a few more changes slipped by that happened to be in the master branch of these submodules.

r? @dtolnay

4 years agoRollup merge of #70846 - tmiasko:compiler-builtins-codegen-units, r=alexcrichton
Dylan DPC [Tue, 7 Apr 2020 12:46:56 +0000 (14:46 +0200)]
Rollup merge of #70846 - tmiasko:compiler-builtins-codegen-units, r=alexcrichton

Keep codegen units unmerged when building compiler builtins

Make it possible to control how mono items are partitioned into code generation
units, when compiling the compiler builtins, by retaining the original partitioning.

Helps with #48625, #61063, #67960, #70489.

r? @alexcrichton

4 years agoRollup merge of #70762 - RalfJung:miri-leak-check, r=oli-obk
Dylan DPC [Tue, 7 Apr 2020 12:46:55 +0000 (14:46 +0200)]
Rollup merge of #70762 - RalfJung:miri-leak-check, r=oli-obk

Miri leak check: memory reachable through globals is not leaked

Also make Miri memory dump prettier by sharing more code with MIR dumping, and fix a bug where the Miri memory dump would print some allocations twice.

r? @oli-obk

Miri PR: https://github.com/rust-lang/miri/pull/1301

4 years agoRollup merge of #70201 - cuviper:clone_into, r=dtolnay
Dylan DPC [Tue, 7 Apr 2020 12:46:53 +0000 (14:46 +0200)]
Rollup merge of #70201 - cuviper:clone_into, r=dtolnay

Small tweaks in ToOwned::clone_into

- `<[T]>::clone_into` is slightly more optimized.
- `CStr::clone_into` is new, letting it reuse its allocation.
- `OsStr::clone_into` now forwards to the underlying slice/`Vec`.

4 years agoClean up E0507 explanation
Guillaume Gomez [Tue, 7 Apr 2020 12:07:57 +0000 (14:07 +0200)]
Clean up E0507 explanation

4 years agoAuto merge of #70837 - nnethercote:speed-up-find_library_crate, r=petrochenkov
bors [Tue, 7 Apr 2020 07:12:51 +0000 (07:12 +0000)]
Auto merge of #70837 - nnethercote:speed-up-find_library_crate, r=petrochenkov

Speed up path searching with `find_library_crate`.

By doing prefix and suffix checking on a `String` copy of each relevant
`PathBuf`, rather than the `PathBuf` itself.

4 years agoUse a `SmallVec` for `Cache::predecessors`.
Nicholas Nethercote [Tue, 7 Apr 2020 05:12:50 +0000 (15:12 +1000)]
Use a `SmallVec` for `Cache::predecessors`.

This is a very small win.

4 years agoAuto merge of #70164 - eddyb:walk-generic-arg, r=nikomatsakis
bors [Tue, 7 Apr 2020 04:01:26 +0000 (04:01 +0000)]
Auto merge of #70164 - eddyb:walk-generic-arg, r=nikomatsakis

ty/walk: iterate `GenericArg`s instead of `Ty`s.

Before this PR, `Ty::walk` only iterated over `Ty`s, but that's becoming an increasing problem with `const` generics, as `ty::Const`s in `Substs` are missed by it.

By working with `GenericArg` instead, we can handle both `Ty`s and `ty::Const`s, but also `ty::Region`s, which used to require ad-hoc mechanisms such as `push_regions`.

I've also removed `TraitRef::input_types`, as it's both long obsolete, and easy to misuse.

4 years agoForward OsStr::clone_into to the inner Vec
Josh Stone [Fri, 20 Mar 2020 22:46:40 +0000 (15:46 -0700)]
Forward OsStr::clone_into to the inner Vec

Despite OS differences, they're all just `Vec<u8>` inside, so we can
just forward `clone_into` calls to that optimized implementation.

4 years agoImplement ToOwned::clone_into for CStr
Josh Stone [Fri, 20 Mar 2020 22:42:56 +0000 (15:42 -0700)]
Implement ToOwned::clone_into for CStr

It can try to keep its allocation by converting the inner `Box` to
`Vec`, using `clone_into` on the bytes, then convert back to `Box`.

4 years agoAuto merge of #70865 - Dylan-DPC:rollup-jje2cuv, r=Dylan-DPC
bors [Tue, 7 Apr 2020 00:56:00 +0000 (00:56 +0000)]
Auto merge of #70865 - Dylan-DPC:rollup-jje2cuv, r=Dylan-DPC

Rollup of 5 pull requests

Successful merges:

 - #70612 (Add io::Write::write_all_vectored)
 - #70690 (Clean up E0501 explanation)
 - #70821 (expose suggestions::InferCtxtExt for clippy)
 - #70839 (clean up E0506 explanation)
 - #70859 (Move sanitize-inline-always test to sanitize directory)

Failed merges:

r? @ghost

4 years agoSpeed up path searching with `find_library_crate`.
Nicholas Nethercote [Mon, 6 Apr 2020 07:44:30 +0000 (17:44 +1000)]
Speed up path searching with `find_library_crate`.

By doing prefix and suffix checking on a `String` copy of each relevant
`PathBuf`, rather than the `PathBuf` itself.

4 years agoUse split_at in slice's ToOwned::clone_into
Josh Stone [Fri, 20 Mar 2020 22:28:26 +0000 (15:28 -0700)]
Use split_at in slice's ToOwned::clone_into

It appears to codegen slightly more efficiently with `split_at` taking
two slices at once, rather than slicing across different calls.

4 years agoUse assoc integer constants in librustc_*
Linus Färnstrand [Mon, 6 Apr 2020 21:09:56 +0000 (23:09 +0200)]
Use assoc integer constants in librustc_*

4 years agoUse assoc integer constants in libserialize
Linus Färnstrand [Mon, 6 Apr 2020 21:09:17 +0000 (23:09 +0200)]
Use assoc integer constants in libserialize

4 years agoRollup merge of #70859 - tmiasko:move-sanitize-inline-always, r=jonas-schievink
Dylan DPC [Mon, 6 Apr 2020 22:31:43 +0000 (00:31 +0200)]
Rollup merge of #70859 - tmiasko:move-sanitize-inline-always, r=jonas-schievink

Move sanitize-inline-always test to sanitize directory

4 years agoRollup merge of #70839 - GuillaumeGomez:cleanup-e0506, r=Dylan-DPC
Dylan DPC [Mon, 6 Apr 2020 22:31:41 +0000 (00:31 +0200)]
Rollup merge of #70839 - GuillaumeGomez:cleanup-e0506, r=Dylan-DPC

clean up E0506 explanation

r? @Dylan-DPC

4 years agoRollup merge of #70821 - rkuhn:expose_suggestions_InferCtxtExt, r=eddyb
Dylan DPC [Mon, 6 Apr 2020 22:31:39 +0000 (00:31 +0200)]
Rollup merge of #70821 - rkuhn:expose_suggestions_InferCtxtExt, r=eddyb

expose suggestions::InferCtxtExt for clippy

This is very useful to do good async/await diagnostic reporting, for example for https://github.com/rust-lang/rust-clippy/pull/5423.

4 years agoRollup merge of #70690 - GuillaumeGomez:cleanup-e0501, r=Dylan-DPC
Dylan DPC [Mon, 6 Apr 2020 22:31:38 +0000 (00:31 +0200)]
Rollup merge of #70690 - GuillaumeGomez:cleanup-e0501, r=Dylan-DPC

Clean up E0501 explanation

r? @Dylan-DPC

4 years agoRollup merge of #70612 - Thomasdezeeuw:issue_70436, r=LukasKalbertodt
Dylan DPC [Mon, 6 Apr 2020 22:31:36 +0000 (00:31 +0200)]
Rollup merge of #70612 - Thomasdezeeuw:issue_70436, r=LukasKalbertodt

Add io::Write::write_all_vectored

Similar to io::Write::write_all but uses io::Write::write_vectored
instead.

Updates #70436

/cc @cramertj @sfackler

4 years agoPut reference to write_vectored in quotes in doc
Thomas de Zeeuw [Mon, 6 Apr 2020 22:00:07 +0000 (00:00 +0200)]
Put reference to write_vectored in quotes in doc

4 years agoDon't import integer module in libstd
Linus Färnstrand [Mon, 6 Apr 2020 21:08:46 +0000 (23:08 +0200)]
Don't import integer module in libstd

4 years agoUse integer assoc consts in libcore
Linus Färnstrand [Mon, 6 Apr 2020 21:08:12 +0000 (23:08 +0200)]
Use integer assoc consts in libcore

4 years agoUse usize::MAX as assoc const in liballoc
Linus Färnstrand [Mon, 6 Apr 2020 21:07:38 +0000 (23:07 +0200)]
Use usize::MAX as assoc const in liballoc

4 years agoStop importing float module in libtest
Linus Färnstrand [Mon, 6 Apr 2020 20:45:44 +0000 (22:45 +0200)]
Stop importing float module in libtest

4 years agoStop importing float module in libserialize
Linus Färnstrand [Mon, 6 Apr 2020 20:45:29 +0000 (22:45 +0200)]
Stop importing float module in libserialize

4 years agoUse assoc float consts in libcore
Linus Färnstrand [Mon, 6 Apr 2020 20:44:51 +0000 (22:44 +0200)]
Use assoc float consts in libcore

4 years agoUse assoc const f32::NAN in liballoc
Linus Färnstrand [Mon, 6 Apr 2020 20:44:04 +0000 (22:44 +0200)]
Use assoc const f32::NAN in liballoc

4 years agoBump stdarch submodule
Linus Färnstrand [Mon, 6 Apr 2020 20:16:09 +0000 (22:16 +0200)]
Bump stdarch submodule

4 years agoBump rust-by-example submodule
Linus Färnstrand [Mon, 6 Apr 2020 20:14:35 +0000 (22:14 +0200)]
Bump rust-by-example submodule

4 years agoBump nomicon submodule
Linus Färnstrand [Mon, 6 Apr 2020 20:13:31 +0000 (22:13 +0200)]
Bump nomicon submodule

4 years agoty: remove `{Existential,}Trait{Ref,Predicate}::input_types`.
Eduard-Mihai Burtescu [Mon, 23 Mar 2020 04:04:03 +0000 (06:04 +0200)]
ty: remove `{Existential,}Trait{Ref,Predicate}::input_types`.

4 years agoty: remove unnecessary `Predicate::walk_tys` and `collect_regions`.
Eduard-Mihai Burtescu [Mon, 23 Mar 2020 02:07:31 +0000 (04:07 +0200)]
ty: remove unnecessary `Predicate::walk_tys` and `collect_regions`.

4 years agoty: switch `Ty::walk` from `Ty` to `GenericArg`.
Eduard-Mihai Burtescu [Mon, 23 Mar 2020 01:57:04 +0000 (03:57 +0200)]
ty: switch `Ty::walk` from `Ty` to `GenericArg`.

4 years agoty/walk: switch `walk_shallow` from `Ty` to `GenericArg`.
Eduard-Mihai Burtescu [Fri, 20 Mar 2020 05:42:14 +0000 (07:42 +0200)]
ty/walk: switch `walk_shallow` from `Ty` to `GenericArg`.

4 years agotraits/coherence: stop using `Ty::walk_shallow`.
Eduard-Mihai Burtescu [Fri, 20 Mar 2020 03:28:17 +0000 (05:28 +0200)]
traits/coherence: stop using `Ty::walk_shallow`.

4 years agoty/walk: keep track of `GenericArg`s on the stack, instead of `Ty`s.
Eduard-Mihai Burtescu [Thu, 19 Mar 2020 19:15:59 +0000 (21:15 +0200)]
ty/walk: keep track of `GenericArg`s on the stack, instead of `Ty`s.

4 years agoAuto merge of #70573 - IgorPerikov:issue#70524_detailed_panic_messages, r=LukasKalbertodt
bors [Mon, 6 Apr 2020 18:14:49 +0000 (18:14 +0000)]
Auto merge of #70573 - IgorPerikov:issue#70524_detailed_panic_messages, r=LukasKalbertodt

Detailed panic messages for Vec functions

pass indexes to insert, remove, drain, and split_off panic messages

closes #70524

4 years agoBTreeMap first/last: add pop methods
Stein Somers [Sun, 5 Apr 2020 16:56:07 +0000 (18:56 +0200)]
BTreeMap first/last: add pop methods

4 years agoBTreeMap first/last: make examples more to the point
Stein Somers [Mon, 6 Apr 2020 17:03:18 +0000 (19:03 +0200)]
BTreeMap first/last: make examples more to the point

4 years agoBTreeMap first/last: simplify implementations
Stein Somers [Sat, 4 Apr 2020 18:32:07 +0000 (20:32 +0200)]
BTreeMap first/last: simplify implementations

4 years agoClean up E0501 explanation
Guillaume Gomez [Thu, 2 Apr 2020 11:30:19 +0000 (13:30 +0200)]
Clean up E0501 explanation

4 years agoci: move /var/lib/docker to /mnt on GHA
Pietro Albini [Mon, 6 Apr 2020 16:09:08 +0000 (18:09 +0200)]
ci: move /var/lib/docker to /mnt on GHA

There are some builders that are running out of disk space while
building the Docker images, such as arm-android. This moves and symlinks
/var/lib/docker to the /mnt partition on Linux GHA.

4 years agoUpdate src/librustc_trait_selection/traits/error_reporting/suggestions.rs
Roland Kuhn [Mon, 6 Apr 2020 15:04:21 +0000 (17:04 +0200)]
Update src/librustc_trait_selection/traits/error_reporting/suggestions.rs

Co-Authored-By: varkor <github@varkor.com>
4 years agoadd detailed panic messages for Vec functions
IgorPerikov [Mon, 6 Apr 2020 14:53:56 +0000 (17:53 +0300)]
add detailed panic messages for Vec functions

4 years agoAuto merge of #70737 - Centril:cleanup-lower-item-id, r=estebank
bors [Mon, 6 Apr 2020 14:43:52 +0000 (14:43 +0000)]
Auto merge of #70737 - Centril:cleanup-lower-item-id, r=estebank

cleanup `lower_item_id`

r? @oli-obk

4 years agoclean up E0506 explanation
Guillaume Gomez [Mon, 6 Apr 2020 12:20:01 +0000 (14:20 +0200)]
clean up E0506 explanation

4 years agoAuto merge of #70771 - RalfJung:ctfe-loop, r=oli-obk
bors [Mon, 6 Apr 2020 11:32:33 +0000 (11:32 +0000)]
Auto merge of #70771 - RalfJung:ctfe-loop, r=oli-obk

 Miri terminator handling: only do progress sanity check for 'Call' terminator

This will still catch mistakes in bad intrinsic/foreign-item shims, which is the main source of errors here.

Fixes https://github.com/rust-lang/rust/issues/70723
r? @oli-obk

4 years agoImprove io::Write::write_all_vectored docs
Thomas de Zeeuw [Mon, 6 Apr 2020 09:21:15 +0000 (11:21 +0200)]
Improve io::Write::write_all_vectored docs

Also adds some more tests with different length IoSlices.

4 years agoAuto merge of #70833 - RalfJung:rustc-layout, r=Centril
bors [Mon, 6 Apr 2020 08:12:30 +0000 (08:12 +0000)]
Auto merge of #70833 - RalfJung:rustc-layout, r=Centril

tweak rustc_layout debug output

As suggested by r? @eddyb @Centril

4 years agotweak rustc_layout debug output
Ralf Jung [Mon, 6 Apr 2020 07:22:48 +0000 (09:22 +0200)]
tweak rustc_layout debug output

4 years agoAuto merge of #70832 - Centril:rollup-ixc09ve, r=Centril
bors [Mon, 6 Apr 2020 02:25:08 +0000 (02:25 +0000)]
Auto merge of #70832 - Centril:rollup-ixc09ve, r=Centril

Rollup of 5 pull requests

Successful merges:

 - #70519 (Tweak output of type params and constraints in the wrong order)
 - #70704 (Make panic unwind the default for aarch64-*-windows-msvc targets)
 - #70713 (Prefer sysroot from rustc in same directory as rust-gdb)
 - #70739 (def_collector, visit_fn: account for no body)
 - #70827 (Use smaller span for suggestion restricting lifetime)

Failed merges:

r? @ghost

4 years agoRollup merge of #70827 - estebank:shorten-sugg-span-add-lt, r=ecstatic-morse
Mazdak Farrokhzad [Mon, 6 Apr 2020 02:24:21 +0000 (04:24 +0200)]
Rollup merge of #70827 - estebank:shorten-sugg-span-add-lt, r=ecstatic-morse

Use smaller span for suggestion restricting lifetime

4 years agoRollup merge of #70739 - Centril:fix-70736, r=petrochenkov
Mazdak Farrokhzad [Mon, 6 Apr 2020 02:24:20 +0000 (04:24 +0200)]
Rollup merge of #70739 - Centril:fix-70736, r=petrochenkov

def_collector, visit_fn: account for no body

Fixes #70736

r? @petrochenkov

4 years agoRollup merge of #70713 - jsgf:rust-gdb-rustc, r=Mark-Simulacrum
Mazdak Farrokhzad [Mon, 6 Apr 2020 02:24:18 +0000 (04:24 +0200)]
Rollup merge of #70713 - jsgf:rust-gdb-rustc, r=Mark-Simulacrum

Prefer sysroot from rustc in same directory as rust-gdb

If there isn't a rustc in the same directory, then fall back to searching
the path.

4 years agoRollup merge of #70704 - danielframpton:aarch64-windows-panic-unwind-default, r=alexc...
Mazdak Farrokhzad [Mon, 6 Apr 2020 02:24:16 +0000 (04:24 +0200)]
Rollup merge of #70704 - danielframpton:aarch64-windows-panic-unwind-default, r=alexcrichton

Make panic unwind the default for aarch64-*-windows-msvc targets

With the llvm fixes from rust-lang/llvm-project#45 (included as a submodule change) we can enable unwinding by default for these targets.

Fixes #65313

There are still a small number of test failures for which we can open individual issues.

r? @alexcrichton

4 years agoRollup merge of #70519 - estebank:constraints-before-args-spans, r=Centril
Mazdak Farrokhzad [Mon, 6 Apr 2020 02:24:15 +0000 (04:24 +0200)]
Rollup merge of #70519 - estebank:constraints-before-args-spans, r=Centril

Tweak output of type params and constraints in the wrong order

r? @Centril @varkor

4 years agoReduce the visual clutter
Esteban Küber [Mon, 6 Apr 2020 00:02:44 +0000 (17:02 -0700)]
Reduce the visual clutter

Using a single label for constraints and generic arguments.

4 years agoreview comments: use `partition_map`
Esteban Küber [Sun, 5 Apr 2020 23:34:16 +0000 (16:34 -0700)]
review comments: use `partition_map`

4 years agoKeep codegen units unmerged when building compiler builtins
Tomasz Miąsko [Mon, 6 Apr 2020 00:00:00 +0000 (00:00 +0000)]
Keep codegen units unmerged when building compiler builtins

4 years agoMove sanitize-inline-always test to sanitize directory
Tomasz Miąsko [Mon, 6 Apr 2020 00:00:00 +0000 (00:00 +0000)]
Move sanitize-inline-always test to sanitize directory

4 years agoUse smaller span for suggestion restricting lifetime
Esteban Küber [Sun, 5 Apr 2020 23:16:55 +0000 (16:16 -0700)]
Use smaller span for suggestion restricting lifetime

4 years agoAuto merge of #70826 - Centril:rollup-yn0hc1h, r=Centril
bors [Sun, 5 Apr 2020 23:08:44 +0000 (23:08 +0000)]
Auto merge of #70826 - Centril:rollup-yn0hc1h, r=Centril

Rollup of 7 pull requests

Successful merges:

 - #70553 (move OS constants to platform crate)
 - #70665 (Do not lose or reorder user-provided linker arguments)
 - #70750 (Match options directly in the Fuse implementation)
 - #70782 (Stop importing the float modules in documentation)
 - #70798 ("cannot resolve" → "cannot satisfy")
 - #70808 (Simplify dtor registration for HermitCore by using a list of destructors)
 - #70824 (Remove marker comments in libstd/lib.rs macro imports)

Failed merges:

r? @ghost

4 years agoRollup merge of #70824 - yoshuawuyts:fix-labels-in-std-macro-imports, r=Mark-Simulacrum
Mazdak Farrokhzad [Sun, 5 Apr 2020 22:53:51 +0000 (00:53 +0200)]
Rollup merge of #70824 - yoshuawuyts:fix-labels-in-std-macro-imports, r=Mark-Simulacrum

Remove marker comments in libstd/lib.rs macro imports

These comments were probably moved around when rustfmt was introduced. They don't correctly denote what they were intended for, so I propose we remove them instead. Thanks!

4 years agoRollup merge of #70808 - hermitcore:tls, r=dtolnay
Mazdak Farrokhzad [Sun, 5 Apr 2020 22:53:50 +0000 (00:53 +0200)]
Rollup merge of #70808 - hermitcore:tls, r=dtolnay

Simplify dtor registration for HermitCore by using a list of destructors

The implementation is similar to the macOS version and doesn't depend on additional OS support

4 years agoRollup merge of #70798 - estebank:satisfy, r=Centril
Mazdak Farrokhzad [Sun, 5 Apr 2020 22:53:48 +0000 (00:53 +0200)]
Rollup merge of #70798 - estebank:satisfy, r=Centril

"cannot resolve" → "cannot satisfy"

CC #66523

r? @Centril

4 years agoRollup merge of #70782 - faern:use-assoc-float-consts, r=dtolnay
Mazdak Farrokhzad [Sun, 5 Apr 2020 22:53:47 +0000 (00:53 +0200)]
Rollup merge of #70782 - faern:use-assoc-float-consts, r=dtolnay

Stop importing the float modules in documentation

Follow up to #69860. I realized I had not searched for and fixed this for the float values. So with this PR they also use the associated constants instead of the module level constants.

For the documentation where it also was using the `consts` submodule I opted to change it to import that directly. This becomes more in line with how other docs that use the `consts` submodule looks. And it also makes it so there are not two `f32` or `f64` things in the current namespace (both the module and the primitive type) and then hopefully confusing documentation readers less.

r? @dtolnay

4 years agoRollup merge of #70750 - cuviper:direct-fuse, r=scottmcm
Mazdak Farrokhzad [Sun, 5 Apr 2020 22:53:45 +0000 (00:53 +0200)]
Rollup merge of #70750 - cuviper:direct-fuse, r=scottmcm

Match options directly in the Fuse implementation

Rather than using `as_ref()`, `as_mut()`, and `?`, we can use `match` directly to save a lot of generated code. This was mentioned as a possibility in https://github.com/rust-lang/rust/pull/70366#issuecomment-603462546, and I found that it had a very large impact on #70332 using `Fuse` within `Chain`. Let's evaluate this change on its own first.

4 years agoRollup merge of #70665 - petrochenkov:linkargs, r=nagisa
Mazdak Farrokhzad [Sun, 5 Apr 2020 22:53:43 +0000 (00:53 +0200)]
Rollup merge of #70665 - petrochenkov:linkargs, r=nagisa

Do not lose or reorder user-provided linker arguments

Linker arguments are potentially order-dependent, so the order in which `-C link-arg` and `-C link-args` options are passed to `rustc` should be preserved when they are passed further to the linker.

Also, multiple `-C link-args` options are now appended to each other rather than overwrite each other.

In other words, `-C link-arg=a -C link-args="b c" -C link-args="d e" -C link-arg=f` is now passed as `"a" "b" "c" "d" "e" "f"` and not as `"d" "e" "a" "f"`.

Addresses https://github.com/rust-lang/rust/pull/70505#issuecomment-606780163.

4 years agoRollup merge of #70553 - hermitcore:abi, r=dtolnay
Mazdak Farrokhzad [Sun, 5 Apr 2020 22:53:42 +0000 (00:53 +0200)]
Rollup merge of #70553 - hermitcore:abi, r=dtolnay

move OS constants to platform crate

to reduce platform specific constants move O_RDONLY etc. and the definition of thread priorities to hermit-abi

4 years agoRemove labels in libstd/lib.rs macro imports
Yoshua Wuyts [Sun, 5 Apr 2020 18:59:10 +0000 (20:59 +0200)]
Remove labels in libstd/lib.rs macro imports

These labels were probably moved around when rustfmt was introduced.

4 years agoAuto merge of #70816 - Dylan-DPC:rollup-kzcs8px, r=Dylan-DPC
bors [Sun, 5 Apr 2020 19:31:14 +0000 (19:31 +0000)]
Auto merge of #70816 - Dylan-DPC:rollup-kzcs8px, r=Dylan-DPC

Rollup of 5 pull requests

Successful merges:

 - #67797 (Query-ify Instance::resolve)
 - #70777 (Don't import integer and float modules, use assoc consts)
 - #70795 (Keep track of position when deleting from a BTreeMap)
 - #70812 (Do not use "nil" to refer to `()`)
 - #70815 (Enable layout debugging for `impl Trait` type aliases)

Failed merges:

r? @ghost

4 years agomake set_span public, as all the fields it touches are public already
Ralf Jung [Sun, 5 Apr 2020 15:37:35 +0000 (17:37 +0200)]
make set_span public, as all the fields it touches are public already

4 years agoset span more accurately during const_prop
Ralf Jung [Sun, 5 Apr 2020 07:27:14 +0000 (09:27 +0200)]
set span more accurately during const_prop

4 years agoMiri engine: use span_bug in a few places
Ralf Jung [Sun, 5 Apr 2020 06:35:31 +0000 (08:35 +0200)]
Miri engine: use span_bug in a few places

4 years agoexpose suggestions::InferCtxtExt for clippy
Roland Kuhn [Sun, 5 Apr 2020 17:25:32 +0000 (19:25 +0200)]
expose suggestions::InferCtxtExt for clippy

4 years agoadd test
Ralf Jung [Sat, 4 Apr 2020 14:57:54 +0000 (16:57 +0200)]
add test

4 years agoMiri terminator handling: only do progress sanity check for 'Call' terminator
Ralf Jung [Sat, 4 Apr 2020 13:53:47 +0000 (15:53 +0200)]
Miri terminator handling: only do progress sanity check for 'Call' terminator

4 years ago"cannot resolve" → "cannot satisfy"
Esteban Küber [Sun, 5 Apr 2020 02:47:50 +0000 (19:47 -0700)]
"cannot resolve" → "cannot satisfy"

4 years agoRollup merge of #70815 - RalfJung:layout-debug, r=jonas-schievink
Dylan DPC [Sun, 5 Apr 2020 16:47:50 +0000 (18:47 +0200)]
Rollup merge of #70815 - RalfJung:layout-debug, r=jonas-schievink

Enable layout debugging for `impl Trait` type aliases

I also made it print the actual type name that the alias picks under the hood.

4 years agoRollup merge of #70812 - rossmacarthur:fix/unit-called-nil, r=LukasKalbertodt
Dylan DPC [Sun, 5 Apr 2020 16:47:48 +0000 (18:47 +0200)]
Rollup merge of #70812 - rossmacarthur:fix/unit-called-nil, r=LukasKalbertodt

Do not use "nil" to refer to `()`

"nil" is not used in the [book](https://doc.rust-lang.org/book) or in the [standard library](https://doc.rust-lang.org/std) anywhere else. Because "nil" is often used in programming languages to refer to "None" or "null" I think it could be a little confusing for newcomers to see this type referred to as "nil".

4 years agoRollup merge of #70795 - Amanieu:btree_remove_tracking, r=Mark-Simulacrum
Dylan DPC [Sun, 5 Apr 2020 16:47:47 +0000 (18:47 +0200)]
Rollup merge of #70795 - Amanieu:btree_remove_tracking, r=Mark-Simulacrum

Keep track of position when deleting from a BTreeMap

This improves the performance of drain_filter and is needed for future Cursor support for BTreeMap.

cc @ssomers
r? @Mark-Simulacrum