Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 7 pull requests #96123

Merged
merged 19 commits into from
Apr 16, 2022
Merged

Rollup of 7 pull requests #96123

merged 19 commits into from
Apr 16, 2022

Conversation

Dylan-DPC
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

dtolnay and others added 19 commits March 15, 2022 17:56
Parse inner attributes on inline const block

According to rust-lang#84414 (comment), inner attributes are intended to be supported *"in all containers for statements (or some subset of statements)"*.

This PR adds inner attribute parsing and pretty-printing for inline const blocks (rust-lang#76001), which contain statements just like an unsafe block or a loop body.

```rust
let _ = const {
    #![allow(...)]

    let x = ();
    x
};
```
…eywiser

Reject `#[thread_local]` attribute on non-static items
…oli-obk

Include Refs in Valtree Creation

This adds references to `const_to_valtree`, which isn't used in the compiler yet, but after the previous changes we made to the thir and mir representations and this change we should be able to finally introduce them in the next PR.

I wasn't able to properly test this code, except indirectly by including a call of `const_to_valtree` in the code that currently creates constants (`turn_into_const_value`).

r? `@lcnr`

cc `@oli-obk` `@RalfJung`
…inline, r=oli-obk

Inline `shallow_resolve_ty` into `ShallowResolver`

addresses fixme I found in infcx
separate flock implementations into separate modules

The main benefit of doing this is that rustfmt will now format each of these modules.
Update mdbook

This just brings in a few small fixes, particularly a rendering fix for chapter names with markdown in them (like the https://doc.rust-lang.org/nightly/rustc/platform-support/kmc-solid.html page).  There's also a minor fix for the search index for duplicate headings.

Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0418
…id, r=notriddle

rustdoc: Rename `def_id` into `item_id` when the type is `ItemId` for readability

As `@notriddle` mentioned in rust-lang#96091, the field name is inaccurate. This PR fixes it by renaming it accordingly to its real type.

r? `@notriddle`
@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Apr 16, 2022
@Dylan-DPC
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Apr 16, 2022

📌 Commit 10e0db5 has been approved by Dylan-DPC

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Apr 16, 2022
@bors
Copy link
Contributor

bors commented Apr 16, 2022

⌛ Testing commit 10e0db5 with merge 878c783...

@bors
Copy link
Contributor

bors commented Apr 16, 2022

☀️ Test successful - checks-actions
Approved by: Dylan-DPC
Pushing 878c783 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 16, 2022
@bors bors merged commit 878c783 into rust-lang:master Apr 16, 2022
@rustbot rustbot added this to the 1.62.0 milestone Apr 16, 2022
@Dylan-DPC Dylan-DPC deleted the rollup-qjog6n1 branch April 16, 2022 21:32
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (878c783): comparison url.

Summary:

  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: 😿 relevant regressions found
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 0 6 0 0 0
mean2 N/A 0.4% N/A N/A N/A
max N/A 0.5% N/A N/A N/A

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression

Footnotes

  1. number of relevant changes

  2. the arithmetic mean of the percent change

@rustbot rustbot added the perf-regression Performance regression. label Apr 16, 2022
@pnkfelix
Copy link
Member

pnkfelix commented Apr 20, 2022

visiting for weekly performance triage.

all six regressions are on the same secondary benchmark: match-stress, and they are all on the order of 0.4%

cachegrind diff report indicates that the blame might be placed on this (the top line entry in the diff report):

--------------------------------------------------------------------------------
Ir
--------------------------------------------------------------------------------
33,824,150  PROGRAM TOTALS

--------------------------------------------------------------------------------
Ir          file:function
--------------------------------------------------------------------------------
33,566,768  ???:<rustc_mir_build::thir::pattern::deconstruct_pat::Constructor>::split::<core::iter::adapters::map::Map<core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_mir_build::thir::pattern::usefulness::PatStack>, <rustc_mir_build::thir::pattern::usefulness::Matrix>::heads::{closure
-8,137,198  ???:<rustc_infer::infer::InferCtxt>::shallow_resolve_ty
 8,048,701  ???:<rustc_infer::infer::ShallowResolver as rustc_middle::ty::fold::TypeFolder>::fold_ty
   322,852  ???:<rustc_infer::infer::resolve::OpportunisticVarResolver as rustc_middle::ty::fold::TypeFolder>::fold_ty
  -158,939  ???:core::ptr::drop_in_place::<rustc_parse::parser::Parser>
  -125,946  ???:<alloc::vec::Vec<usize> as core::ops::deref::Deref>::deref
   102,350  ???:<rustc_expand::mbe::macro_rules::ParserAnyMacro>::make
   -91,381  ???:<rustc_middle::ty::Ty as rustc_middle::ty::fold::TypeFoldable>::super_fold_with::<rustc_infer::infer::resolve::OpportunisticVarResolver>
   -72,721  ./string/../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:__memcpy_sse2_unaligned_erms
    70,108  ???:<rustc_infer::infer::canonical::canonicalizer::Canonicalizer as rustc_middle::ty::fold::TypeFolder>::fold_ty
...

rustc_mir_build itself didn't change in this rollup.

(Could the regression be explained by the valtree changes?)

In any case, the narrow scope of the regression, the secondary nature of the regressed benchmark, the relatively low amount of regression, and the fact that this is in a rollup and thus fundamentally more difficuilt to tease apart, all adds up to: not worth the time to investigate further -- benefit/cost tradeoff is not worth it.

@rustbot label: +perf-regression-triaged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet