Commit Graph

109782 Commits

Author SHA1 Message Date
Guillaume Gomez 38eb369fa4 Enforce Python 3 as much as possible 2020-04-10 09:09:58 -04:00
bors 42abbd8878 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
2020-04-07 13:43:30 +00:00
Dylan DPC 89d661f15d
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
2020-04-07 14:46:59 +02:00
Dylan DPC 78c64d062a
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
2020-04-07 14:46:58 +02:00
Dylan DPC f56fb51a8b
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
2020-04-07 14:46:56 +02:00
Dylan DPC f2c59bd603
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
2020-04-07 14:46:55 +02:00
Dylan DPC 795bc2ccff
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`.
2020-04-07 14:46:53 +02:00
bors 39b62533c7 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.
2020-04-07 07:12:51 +00:00
bors 209b2be09f 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.
2020-04-07 04:01:26 +00:00
Josh Stone f854070bb8 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.
2020-04-06 18:26:37 -07:00
Josh Stone b80fa76ee0 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`.
2020-04-06 18:26:37 -07:00
bors bf1f2eedda 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
2020-04-07 00:56:00 +00:00
Nicholas Nethercote a932616cf1 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.
2020-04-07 09:21:15 +10:00
Josh Stone e8339e820b 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.
2020-04-06 15:50:59 -07:00
Linus Färnstrand f7778d36c7 Use assoc integer constants in librustc_* 2020-04-07 00:43:16 +02:00
Linus Färnstrand cf8df0157a Use assoc integer constants in libserialize 2020-04-07 00:43:15 +02:00
Dylan DPC b9fe46d45b
Rollup merge of #70859 - tmiasko:move-sanitize-inline-always, r=jonas-schievink
Move sanitize-inline-always test to sanitize directory
2020-04-07 00:31:43 +02:00
Dylan DPC 6e412786de
Rollup merge of #70839 - GuillaumeGomez:cleanup-e0506, r=Dylan-DPC
clean up E0506 explanation

r? @Dylan-DPC
2020-04-07 00:31:41 +02:00
Dylan DPC 728136c73d
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.
2020-04-07 00:31:39 +02:00
Dylan DPC 7500bcfbb2
Rollup merge of #70690 - GuillaumeGomez:cleanup-e0501, r=Dylan-DPC
Clean up E0501 explanation

r? @Dylan-DPC
2020-04-07 00:31:38 +02:00
Dylan DPC 5768385615
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
2020-04-07 00:31:36 +02:00
Thomas de Zeeuw 5d09f9f051 Put reference to write_vectored in quotes in doc 2020-04-07 00:00:07 +02:00
Linus Färnstrand 68b1af6624 Don't import integer module in libstd 2020-04-06 23:08:46 +02:00
Linus Färnstrand 3e4396b8b5 Use integer assoc consts in libcore 2020-04-06 23:08:12 +02:00
Linus Färnstrand e4fc04b6df Use usize::MAX as assoc const in liballoc 2020-04-06 23:07:38 +02:00
Linus Färnstrand 09b5d666a0 Stop importing float module in libtest 2020-04-06 22:45:44 +02:00
Linus Färnstrand ebcf1e7b73 Stop importing float module in libserialize 2020-04-06 22:45:29 +02:00
Linus Färnstrand cf1c7edd2d Use assoc float consts in libcore 2020-04-06 22:44:51 +02:00
Linus Färnstrand 65e10e3436 Use assoc const f32::NAN in liballoc 2020-04-06 22:44:04 +02:00
Linus Färnstrand 01b3293e49 Bump stdarch submodule 2020-04-06 22:16:09 +02:00
Linus Färnstrand d0a78ea94a Bump rust-by-example submodule 2020-04-06 22:14:35 +02:00
Linus Färnstrand e1a36e89db Bump nomicon submodule 2020-04-06 22:13:31 +02:00
Eduard-Mihai Burtescu 626abc7977 ty: remove `{Existential,}Trait{Ref,Predicate}::input_types`. 2020-04-06 21:55:51 +03:00
Eduard-Mihai Burtescu b7fdc7b619 ty: remove unnecessary `Predicate::walk_tys` and `collect_regions`. 2020-04-06 21:55:50 +03:00
Eduard-Mihai Burtescu 3410aeddbe ty: switch `Ty::walk` from `Ty` to `GenericArg`. 2020-04-06 21:55:50 +03:00
Eduard-Mihai Burtescu 26199f0cbc ty/walk: switch `walk_shallow` from `Ty` to `GenericArg`. 2020-04-06 21:55:50 +03:00
Eduard-Mihai Burtescu 0d4705b009 traits/coherence: stop using `Ty::walk_shallow`. 2020-04-06 21:55:43 +03:00
Eduard-Mihai Burtescu e53c42c0b3 ty/walk: keep track of `GenericArg`s on the stack, instead of `Ty`s. 2020-04-06 21:50:11 +03:00
bors 6dee5f1126 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
2020-04-06 18:14:49 +00:00
Guillaume Gomez 84c97ee9a0 Clean up E0501 explanation 2020-04-06 18:12:42 +02:00
Roland Kuhn 57a6b7bd22
Update src/librustc_trait_selection/traits/error_reporting/suggestions.rs
Co-Authored-By: varkor <github@varkor.com>
2020-04-06 17:04:21 +02:00
IgorPerikov 9fc77c0e15 add detailed panic messages for Vec functions 2020-04-06 17:53:56 +03:00
bors 40158901d5 Auto merge of #70737 - Centril:cleanup-lower-item-id, r=estebank
cleanup `lower_item_id`

r? @oli-obk
2020-04-06 14:43:52 +00:00
Guillaume Gomez 3a10bdcfb6 clean up E0506 explanation 2020-04-06 14:20:01 +02:00
bors bd18bc9a4c 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
2020-04-06 11:32:33 +00:00
Thomas de Zeeuw 63118d1fd7 Improve io::Write::write_all_vectored docs
Also adds some more tests with different length IoSlices.
2020-04-06 11:21:15 +02:00
bors 733f104f13 Auto merge of #70833 - RalfJung:rustc-layout, r=Centril
tweak rustc_layout debug output

As suggested by r? @eddyb @Centril
2020-04-06 08:12:30 +00:00
Ralf Jung 83fb0b1e8c tweak rustc_layout debug output 2020-04-06 09:22:48 +02:00
bors af89eb5e5b 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
2020-04-06 02:25:08 +00:00
Mazdak Farrokhzad 3faec69865
Rollup merge of #70827 - estebank:shorten-sugg-span-add-lt, r=ecstatic-morse
Use smaller span for suggestion restricting lifetime
2020-04-06 04:24:21 +02:00