bors [Mon, 11 Feb 2019 10:34:09 +0000 (10:34 +0000)]
Auto merge of #56645 - pietroalbini:fix-unused-imports, r=estebank
Initial implementation of rustfixable unused_imports lint
This PR adds the initial implementation of rustfixable `unused_imports` lint. The implementation works, but rustfix is not able to apply all the suggestions until https://github.com/rust-lang/rust/issues/53934 is fixed. It also needs https://github.com/rust-lang/rust/pull/58296 to hide the suggested note since it's really useless.
cc https://github.com/rust-lang/rust/issues/47888
<details><summary><code>cargo fix</code> in action on the <code>unused_imports</code> lint</summary>
* Replace util::without_prefix with Path::strip_prefix rust-lang/cargo#6620
* keep track of crates that are whitelisted to be used even if yanked rust-lang/cargo#6611
* Fix default DYLD_FALLBACK_LIBRARY_PATH on MacOS. rust-lang/cargo#6625
* Bail when trying to run "test --doc --no-run" rust-lang/cargo#6628
* In cargo test's help, add that examples are built rust-lang/cargo#6619
* Extract & re-use filter_targets in cargo_compile rust-lang/cargo#6621
* Test cleanup: remove unnecessary with_status(0) rust-lang/cargo#6630
* Fix run's help message rust-lang/cargo#6631
* Some updates to bash completion. rust-lang/cargo#6644
* Introduce Source::download_now rust-lang/cargo#6637
* Switch from unused_imports to deprecated to test unfixable warnings rust-lang/cargo#6649
bors [Sun, 10 Feb 2019 22:35:36 +0000 (22:35 +0000)]
Auto merge of #58361 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 16 pull requests
Successful merges:
- #57259 (Update reference of rlibc crate to compiler-builtins crate)
- #57740 (Use `to_ne_bytes` for converting IPv4Addr to octets)
- #57926 (Tiny expansion to docs for `core::convert`.)
- #58157 (Add Cargo.lock automatically adding message)
- #58203 (rustdoc: display sugared return types for async functions)
- #58243 (Add trait alias support in rustdoc)
- #58262 (Add #[must_use] message to Fn* traits)
- #58295 (std::sys::unix::stdio: explain why we do into_raw)
- #58297 (Cleanup JS a bit)
- #58317 (Some writing improvement, conciseness of intro)
- #58324 (miri: give non-generic functions a stable address)
- #58332 (operand-to-place copies should never be overlapping)
- #58345 (When there are multiple filenames, print what got interpreted as filenames)
- #58346 (rpath computation: explain why we pop())
- #58350 (Fix failing tidy (line endings on Windows))
- #58352 (miri value visitor: use `?` in macro)
Guillaume Gomez [Sun, 10 Feb 2019 20:45:22 +0000 (21:45 +0100)]
Rollup merge of #58345 - RalfJung:2nd-filename, r=matthewjasper
When there are multiple filenames, print what got interpreted as filenames
I have written code that crafts command lines for rustc, and when I get "multiple input filenames provided" it can be quite hard to figure out where in this long list of arguments the mistake is hiding. Probably I passed an argument to a flag that does not expect an argument, but which flag would that be?
This changes the error message to print the first two filenames, to make it easier to debug what is going on.
Guillaume Gomez [Sun, 10 Feb 2019 20:45:09 +0000 (21:45 +0100)]
Rollup merge of #57926 - icefoxen:test-doc-pr, r=frewsxcv
Tiny expansion to docs for `core::convert`.
This is not really significant, accept or reject as you wish. I just want to make sure I understand how the PR process works and that I'm doing it right before doing a bigger one for #33417.
Guillaume Gomez [Sun, 10 Feb 2019 20:45:08 +0000 (21:45 +0100)]
Rollup merge of #57740 - JakubOnderka:ipv4addr-to_ne_bytes, r=scottmcm
Use `to_ne_bytes` for converting IPv4Addr to octets
It is easier and it should be also faster, because [`to_ne_bytes`](https://doc.rust-lang.org/std/primitive.u32.html#method.to_ne_bytes) just calls `mem::transmute`.
bors [Sun, 10 Feb 2019 11:18:50 +0000 (11:18 +0000)]
Auto merge of #58085 - wesleywiser:profiler_2, r=wesleywiser
Implement more detailed self profiling
Timing data and cache hits/misses are now recorded at the query level.
This allows us to show detailed per query information such as total time
for each query.
To see detailed query information in the summary pass the `-Z verbose`
flag. For example:
bors [Sun, 10 Feb 2019 08:52:10 +0000 (08:52 +0000)]
Auto merge of #58103 - RalfJung:mir-shim-dump, r=eddyb
Make -Zdump-mir dump shims
Fixes https://github.com/rust-lang/rust/issues/53532 by (a) making the MIR shim generation use the MIR pass infrastructure, and (b) fixing said infrastructure to handle the fallout.
bors [Sun, 10 Feb 2019 01:33:17 +0000 (01:33 +0000)]
Auto merge of #57770 - Zoxc:no-hash-query, r=michaelwoerister
Add a query type which is always marked as red if it runs
This is useful for queries which produce results which are very likely to change if their inputs do.
I also expect this to be useful for end to end queries because 1) we don't need `HashStable` impls and 2) we avoid the overhead of hashing the result of large results like the AST or the HIR map.
bors [Sat, 9 Feb 2019 15:11:43 +0000 (15:11 +0000)]
Auto merge of #57885 - arielb1:xform-probe, r=nikomatsakis
Avoid committing to autoderef in object method probing
This fixes the "leak" introduced in #57835 (see test for details, also apparently #54252 had no tests for the "leaks" that were fixed in it, so go ahead and add one).
Maybe beta-nominating because regression, but I'm against landing things on beta we don't have to.
bors [Sat, 9 Feb 2019 12:38:51 +0000 (12:38 +0000)]
Auto merge of #58207 - nnethercote:intern_lazy_const, r=oli-obk
Make `intern_lazy_const` actually intern its argument.
Currently it just unconditionally allocates it in the arena.
For a "Clean Check" build of the the `packed-simd` benchmark, this
change reduces both the `max-rss` and `faults` counts by 59%; it
slightly (~3%) increases the instruction counts but the `wall-time` is
unchanged.
For the same builds of a few other benchmarks, `max-rss` and `faults`
drop by 1--5%, but instruction counts and `wall-time` changes are in the
noise.
bors [Sat, 9 Feb 2019 03:54:31 +0000 (03:54 +0000)]
Auto merge of #57184 - varkor:deny-warnings-lib, r=Mark-Simulacrum
Deny warnings in libcore and libstd
This probably fixes https://github.com/rust-lang/rust/issues/57178 (though there may still be some crates that need warnings denied). At least after this change, rustc currently produces no warnings during compilation.
Rollup merge of #58275 - RalfJung:miri-test-libcore, r=Mark-Simulacrum
libcore, liballoc: disable tests in Miri
I am going to run the libcore and liballoc unit test suites in Miri. Not all tests pass. This PR disables a whole bunch of tests when running in Miri, to get us to a baseline from which I can investigate failures.
bors [Fri, 8 Feb 2019 17:13:56 +0000 (17:13 +0000)]
Auto merge of #58161 - davidtwco:issue-57960, r=arielb1
Lower constant patterns with ascribed types.
Fixes #57960.
This PR fixes a bug introduced by #55937 which started checking user
type annotations for associated type patterns. Where lowering a
associated constant expression would previously return a
`PatternKind::Constant`, it now returns a `PatternKind::AscribeUserType`
with a `PatternKind::Constant` inside, this PR unwraps that to
access the constant pattern inside and behaves as before.
bors [Fri, 8 Feb 2019 10:17:01 +0000 (10:17 +0000)]
Auto merge of #58213 - Mark-Simulacrum:fix-checktools, r=alexcrichton
Add embedded book to test such that checktools works
r? @alexcrichton
FWIW this doesn't attempt to make sure we don't break check tools again -- we intentionally make the bash script not exit when x.py fails so we'd need some special case handling so for now I'm just fixing the bug itself, not its cause.