about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2021-05-02Rollup merge of #84763 - tdelabro:shrink-doctree-module, r=jyn514Dylan DPC-15/+14
shrink doctree::Module helps https://github.com/rust-lang/rust/issues/76382
2021-05-02Rollup merge of #84752 - lrh2000:generator-debuginfo, r=tmandryDylan DPC-80/+114
Fix debuginfo for generators First, all fields except the discriminant (including `outer_fields`) should be put into structures inside the variant part, which gives an equivalent layout but offers us much better integration with debuggers. Second, artificial flags in generator variants should be removed. - Literally, variants are not artificial. We have `yield` statements, upvars and inner variables in the source code. - Functionally, we don't want debuggers to suppress the variants. It contains the state of the generator, which is useful when debugging. So they shouldn't be marked artificial. - Debuggers may use artificial flags to find the active variant. In this case, marking variants artificial will make debuggers not work properly. Fixes #62572. Fixes #79009. And refer https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Debuginfo.20for.20generators.
2021-05-02Rollup merge of #84392 - dario23:fmt-assert-args-pub, r=varkor,RalfJungDylan DPC-1/+1
Make AssertKind::fmt_assert_args public
2021-05-02Rollup merge of #84358 - sexxi-goose:print_captures_borrowck_rebased, ↵Dylan DPC-152/+534
r=nikomatsakis Update closure capture error logging for disjoint captures for disjoint captures Improved error logging when `#![feature(capture_disjoint_fields)]` is used. Closes https://github.com/rust-lang/project-rfc-2229/issues/8 Closes https://github.com/rust-lang/project-rfc-2229/issues/36 Closes https://github.com/rust-lang/project-rfc-2229/issues/39 Closes #76005
2021-05-02Auto merge of #84802 - jyn514:option-dead-code, r=Mark-Simulacrumbors-429/+453
Remove dead code in `rustc_session::Options` - Don't recompile the same functions for each debugging option This reduces the amount of items in the crate by quite a lot. - Remove unused `parse_opt_list` and `parse_pathbuf_push` functions - Remove unused macro parameters - Remove `allow(dead_code)`.
2021-05-02Auto merge of #84805 - Mark-Simulacrum:no-dup-extend, r=cjgillotbors-8/+5
Avoid generating QueryMap::extend for each key type Should be a small win on compile times for rustc_query_impl, where this ends up getting codegen'd.
2021-05-02fix nll test stderrChris Pardy-1/+1
2021-05-02Auto merge of #84750 - jyn514:nix-cargo, r=Mark-Simulacrumbors-5/+7
Don't download cargo twice when download-rustc is set Previously, this caused a bug on NixOS: 1. bootstrap.py would download and patch stage0/cargo 2. bootstrap.py would download nightly cargo, but extract it to stage0/cargo instead of ci-rustc/cargo. It would still try (and fail) to patch ci-rustc/cargo. 3. bootstrap.py would fail to build rustbuild because stage0/cargo wasn't patched. The "proper" fix is to extract nightly cargo to ci-rustc instead, but it doesn't seem to be necessary at all, so this just skips downloading it instead. Fixes https://github.com/rust-lang/rust/issues/84702
2021-05-02Auto merge of #84725 - sebpop:arm64-isb, r=joshtriplettbors-1/+1
[Arm64] use isb instruction instead of yield in spin loops On arm64 we have seen on several databases that ISB (instruction synchronization barrier) is better to use than yield in a spin loop. The yield instruction is a nop. The isb instruction puts the processor to sleep for some short time. isb is a good equivalent to the pause instruction on x86. Below is an experiment that shows the effects of yield and isb on Arm64 and the time of a pause instruction on x86 Intel processors. The micro-benchmarks use https://github.com/google/benchmark.git ``` $ cat a.cc static void BM_scalar_increment(benchmark::State& state) { int i = 0; for (auto _ : state) benchmark::DoNotOptimize(i++); } BENCHMARK(BM_scalar_increment); static void BM_yield(benchmark::State& state) { for (auto _ : state) asm volatile("yield"::); } BENCHMARK(BM_yield); static void BM_isb(benchmark::State& state) { for (auto _ : state) asm volatile("isb"::); } BENCHMARK(BM_isb); BENCHMARK_MAIN(); $ g++ -o run a.cc -O2 -lbenchmark -lpthread $ ./run -------------------------------------------------------------- Benchmark Time CPU Iterations -------------------------------------------------------------- AWS Graviton2 (Neoverse-N1) processor: BM_scalar_increment 0.485 ns 0.485 ns 1000000000 BM_yield 0.400 ns 0.400 ns 1000000000 BM_isb 13.2 ns 13.2 ns 52993304 AWS Graviton (A-72) processor: BM_scalar_increment 0.897 ns 0.874 ns 801558633 BM_yield 0.877 ns 0.875 ns 800002377 BM_isb 13.0 ns 12.7 ns 55169412 Apple Arm64 M1 processor: BM_scalar_increment 0.315 ns 0.315 ns 1000000000 BM_yield 0.313 ns 0.313 ns 1000000000 BM_isb 9.06 ns 9.06 ns 77259282 ``` ``` static void BM_pause(benchmark::State& state) { for (auto _ : state) asm volatile("pause"::); } BENCHMARK(BM_pause); Intel Skylake processor: BM_scalar_increment 0.295 ns 0.295 ns 1000000000 BM_pause 41.7 ns 41.7 ns 16780553 ``` Tested on Graviton2 aarch64-linux with `./x.py test`.
2021-05-02Auto merge of #84638 - mark-i-m:unignore-tests, r=Mark-Simulacrumbors-4/+1
Unignore a couple of tests
2021-05-01Avoid generating QueryMap::extend for each key typeMark Rousskov-8/+5
2021-05-01Auto merge of #84471 - jyn514:linkcheck-llvm, r=Mark-Simulacrumbors-1/+4
Allow running `x.py test --stage 2 src/tools/linkchecker` with `download-rustc = true` Previously, the LD_LIBRARY_PATH for the linkchecker looked like `build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib`, because the linkchecker depends on the master copy of the standard library. This is true, but doesn't include the library path for the compiler libraries: ``` /home/joshua/src/rust/rust/build/x86_64-unknown-linux-gnu/stage1-tools-bin/error_index_generator: error while loading shared libraries: libLLVM-12-rust-1.53.0-nightly.so: cannot open shared object file: No such file or directory ``` That file is in `build/x86_64-unknown-linux-gnu/stage1/lib/libLLVM-12-rust-1.53.0-nightly.so`, which wasn't included in the dynamic path. This adds `build/x86_64-unknown-linux-gnu/stage1/lib` to the dynamic path for the linkchecker.
2021-05-01Remove unused macro parametersJoshua Nelson-3/+3
2021-05-01Remove unused `parse_pathbuf_push` functionJoshua Nelson-12/+0
This also remove the `allow(dead_code)`.
2021-05-01Don't recompile the same functions for each debugging optionJoshua Nelson-412/+461
This reduces the amount of items in the crate by quite a lot.
2021-05-01add docstrings and add issue to FIXMEsChris Pardy-3/+5
2021-05-01Update compiler/rustc_mir/src/borrow_check/diagnostics/explain_borrow.rsChrisPardy-1/+1
Co-authored-by: Niko Matsakis <niko@alum.mit.edu>
2021-05-01Update compiler/rustc_mir/src/borrow_check/diagnostics/explain_borrow.rsChrisPardy-1/+1
Co-authored-by: Niko Matsakis <niko@alum.mit.edu>
2021-05-01Update compiler/rustc_mir/src/borrow_check/diagnostics/explain_borrow.rsChrisPardy-2/+2
Co-authored-by: Niko Matsakis <niko@alum.mit.edu>
2021-05-01Closure capture borrow diagnostics for disjoint capturesChris Pardy-151/+531
2021-05-01Remove unused parse_opt_list functionJoshua Nelson-13/+0
2021-05-01Auto merge of #84410 - BoxyUwU:blue, r=varkorbors-10/+51
Fix generic arg mismatch errors being ignored with explicit late bound lifetimes Fixes #83466 r? `@varkor`
2021-05-01Auto merge of #83114 - cjgillot:hop, r=eddybbors-273/+289
Move HIR parenting information out of hir_owner Split out of #82681. The parent of a HIR node and its content are currently bundled together, but are rarely used together. This PR separates both information in two distinct queries for HIR owners. This reduces incremental invalidation for HIR items that appear within a function body when this body (and the local ids) changes.
2021-05-01test: *sneezes*Ellen-10/+51
2021-05-01Auto merge of #83857 - ABouttefeux:master, r=jyn514bors-1/+71
added --no-run option for rustdoc resolve #59053 add `--no-run` option for `rustdoc` for compiling doc test but not running them. Intended for use with `--persist-doctests`.
2021-05-01compute where_outer on demand, remove it from ModuleTimothée Delabrouille-15/+14
2021-05-01Auto merge of #84658 - Amanieu:reserved_regs, r=petrochenkovbors-27/+66
Be stricter about rejecting LLVM reserved registers in asm! LLVM will silently produce incorrect code if these registers are used as operands. cc `@rust-lang/wg-inline-asm`
2021-05-01Reserve x18 on AArch64 and un-reserve x16Amanieu d'Antras-10/+9
2021-05-01Auto merge of #84786 - JohnTitor:rollup-j5omx6f, r=JohnTitorbors-1533/+1104
Rollup of 8 pull requests Successful merges: - #84601 (rustdoc: Only store locations in Cache::extern_locations and calculate the other info on-demand) - #84704 (platform-support.md: Update for consistency with Target Tier Policy) - #84724 (Replace llvm::sys::fs::F_None with llvm::sys::fs::OF_None) - #84740 (Reset the docs' copy path button after 1 second) - #84749 (Sync `rustc_codegen_cranelift`) - #84756 (Add a ToC to the Target Tier Policy documentation) - #84765 (Update cargo) - #84774 (Fix misspelling) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-05-01Apply suggestions from code reviewAliénore Bouttefeux-2/+3
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2021-05-01Rollup merge of #84774 - kraai:fix-misspelling, r=jyn514Yuki Okushi-1/+1
Fix misspelling Fix a misspelling of "or" in the source_code_based_coverage section of *The Rust Unstable Book*.
2021-05-01Rollup merge of #84765 - ehuss:update-cargo, r=ehussYuki Okushi-0/+0
Update cargo 7 commits in 4369396ce7d270972955d876eaa4954bea56bcd9..f3e13226d6d17a2bc5f325303494b43a45f53b7f 2021-04-27 14:35:53 +0000 to 2021-04-30 21:50:27 +0000 - Fix problem with metrics test. (rust-lang/cargo#9440) - Show transfer rate when fetching/updating registry index (rust-lang/cargo#9395) - Fix collision doc tests randomly failing. (rust-lang/cargo#9434) - Add missing tracking issues and unstable docs. (rust-lang/cargo#9429) - Fix dep-info files emitting paths relative to deps' roots (rust-lang/cargo#9421) - Upgrade to GitHub-native Dependabot (rust-lang/cargo#9428) - Only deny the `unused_mut` lint (rust-lang/cargo#9425)
2021-05-01Rollup merge of #84756 - badboy:toc-for-tier-policy, r=GuillaumeGomezYuki Okushi-0/+11
Add a ToC to the Target Tier Policy documentation The policy document is quite lengthy, I figured it might be good to have a quick way to jump to the specific tier policies.
2021-05-01Rollup merge of #84749 - XAMPPRocky:cranelift-rebase, r=bjorn3Yuki Okushi-1294/+792
Sync `rustc_codegen_cranelift` Retrying #84746 r? ``@bjorn3`` --- Edit(bjorn3): Since the last sync there have been some refactorings around the driver code in preparation for a planned new feature. In addition ``@mominul`` implemented `-Ctarget-cpu` support and ``@XAMPPRocky`` fixed compilation of cg_clif itself for Windows with the MSVC toolchain.
2021-05-01Rollup merge of #84740 - r00ster91:patch-6, r=GuillaumeGomezYuki Okushi-20/+35
Reset the docs' copy path button after 1 second I like that this copy path button on the top next to the type/module's name changes to a check mark when you successfully clicked and copied the path but I find it really weird how the icon stays that check mark forever after the first time of clicking it. Imagine you leave that documentation tab open and come back after 2 hours and you still see that check mark in that box because you copied the path 2 hours ago. You will probably be confused and you might've forgotten what that button even does (even more so currently where this is a new feature, or when you simply don't use it often), so I really think at some point it should go back to the ⎘ icon which, at least to me, pretty clearly indicates copying, whereas the check mark (if it stays there for so long) could falsely look like a verification mark indicating "this module is verified" or something like that. I believe after a longer period of time it's not logical to still tell the user "yes you've copied this successful". In addition to this timeout, maybe it could be made so that you can't copy again until this cooldown of 1 second is over, but I'm not sure how useful or user-friendly that feature would be so maybe it's fine the way it is now. Also the timeout is cleared every time you click again so if you constantly click it, it won't reset during that.
2021-05-01Rollup merge of #84724 - MaskRay:sys-fs, r=petrochenkovYuki Okushi-3/+3
Replace llvm::sys::fs::F_None with llvm::sys::fs::OF_None The former is deprecated. OF_None has been available in LLVM since 2018-06. ----- OF_None (https://reviews.llvm.org/rG1f67a3cba9b09636c56e2109d8a35ae96dc15782) exists in LLVM 9. https://reviews.llvm.org/D101506 may drop `F_None` support.
2021-05-01Rollup merge of #84704 - joshtriplett:platform-support-target-tier-policy, ↵Yuki Okushi-131/+174
r=pietroalbini platform-support.md: Update for consistency with Target Tier Policy Split into five sections to match the tiers: "Tier 1 with Host Tools", "Tier 1", "Tier 2 with Host Tools", "Tier 2", and "Tier 3". Explain each tier briefly in prose, and link to the corresponding section of the policy for full requirements. Drop the `host` columns from the first four, since the different sections distinguish that. (Keep the `host` column for "Tier 3", since it's a single list and the `host` column just indicates if host tools are expected to work.) Targets with host tools always have full support for std, so drop the `std` column from those. Move the explanations of the `std` column next to the appropriate tables, and drop the unknown/WIP case for tier 2 targets. Use "target" terminology consistently throughout. Sort each table by target name.
2021-05-01Rollup merge of #84601 - tdelabro:rustdoc-get-rid-of-cache-extern_locations, ↵Yuki Okushi-84/+88
r=jyn514 rustdoc: Only store locations in Cache::extern_locations and calculate the other info on-demand help #84588
2021-05-01Auto merge of #84582 - richkadel:issue-84561, r=tmandrybors-68/+861
Vastly improves coverage spans for macros Fixes: #84561 This resolves problems where macros like `trace!(...)` would show zero coverage if tracing was disabled, and `assert_eq!(...)` would show zero coverage if the assertion did not fail, because only one coverage span was generated, for the branch. This PR started with an idea that I could just drop branching blocks with same span as expanded macro. (See the fixed issue for more details.) That did help, but it didn't resolve everything. I also needed to add a span specifically for the macro name (plus `!`) to ensure the macro gets coverage even if it's internal expansion adds conditional branching blocks that are retained, and would otherwise drop the outer span. Now that outer span is _only_ the `(argument, list)`, which can safely be dropped now), because the macro name has its own span. While testing, I also noticed the spanview debug output can cause an ICE on a function with no body. The workaround for this is included in this PR (separate commit). r? `@tmandry` cc? `@wesleywiser`
2021-04-30Fix misspellingMatthew James Kraai-1/+1
2021-05-01Auto merge of #84463 - jyn514:refactor-impl, r=CraftSpiderbors-30/+18
rustdoc: Remove unnecessary `provided_trait_methods` field from Impl It can be calculated on-demand. Helps with https://github.com/rust-lang/rust/issues/76382.
2021-04-30Remove unnecessary `provided_trait_methods` field from ImplJoshua Nelson-30/+18
It can be calculated on-demand.
2021-05-01Auto merge of #84747 - pietroalbini:bump-version, r=pietroalbinibors-1/+1
Bump version to 1.54.0 cc `@Mark-Simulacrum` r? `@ghost`
2021-04-30Update cargoEric Huss-0/+0
2021-04-30Auto merge of #84719 - Mark-Simulacrum:reduce-query-impl, r=davidtwcobors-49/+55
Move iter_results to dyn FnMut rather than a generic This means that we're no longer generating the iteration/locking code for each invocation site of iter_results, rather just once per query (roughly), which seems much better: this is a 15% win in instruction counts when compiling the rustc_query_impl crate. The code where this is used also is pretty cold, I suspect; the old solution didn't fully monomorphize either.
2021-04-30Auto merge of #84753 - hyd-dev:update-miri, r=RalfJungbors-7/+9
Update Miri To include rust-lang/miri#1783, hence fixes #84741. r? `@RalfJung`
2021-04-30Avoid using rbx in SGX inline assembly since it is reservedAmanieu d'Antras-2/+8
2021-04-30Merge commit '15c8d31392b9fbab3b3368b67acc4bbe5983115a' into cranelift-rebaseErin Power-1/+4
2021-04-30No-op register_jit on Windows (#1170)XAMPPRocky-1/+4
* No-op register_jit on Windows Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
2021-04-30Add a ToC to the Target Tier Policy documentationJan-Erik Rediger-0/+11