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 #101485

Merged
merged 20 commits into from
Sep 6, 2022
Merged

Rollup of 7 pull requests #101485

merged 20 commits into from
Sep 6, 2022

Conversation

GuillaumeGomez
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

compiler-errors and others added 20 commits September 3, 2022 08:11
Suggested by the team in this Zulip Topic https://rust-lang.zulipchat.com/#narrow/stream/336883-i18n/topic/.23100717.20SessionDiagnostic.20on.20Handler

Handler already has almost all the capabilities of ParseSess when it comes to diagnostic emission, in this migration we only needed to add the ability to access source_map from the emitter in order to get a Snippet and the start_point. Not sure if this is the best way to address this gap
And move them into a module, as has been done previously for AST, HIR,
etc.
…, r=oli-obk

Include enum path in variant suggestion

(except for `Result` and `Option`, which we should have via the prelude)

Fixes rust-lang#101356
…ndler-in-into-diagnostic, r=davidtwco

Update `SessionDiagnostic::into_diagnostic` to take `Handler` instead of `ParseSess`

Suggested by the team in [this Zulip Topic](https://rust-lang.zulipchat.com/#narrow/stream/336883-i18n/topic/.23100717.20SessionDiagnostic.20on.20Handler).

`Handler` already has almost all the capabilities of `ParseSess` when it comes to diagnostic emission, in this migration we only needed to add the ability to access `source_map` from the emitter in order to get a `Snippet` and the `start_point`. Not sure if adding these two methods [`span_to_snippet_from_emitter` and  `span_start_point_from_emitter`] is the best way to address this gap.

P.S. If this goes in the right direction, then we probably may want to move `SessionDiagnostic` to `rustc_errors` and rename it to `DiagnosticHandler` or something similar.

r? `@davidtwco`
r? `@compiler-errors`
…it-lifetime, r=oli-obk

Suggest introducing an explicit lifetime if it does not exist

Fixes rust-lang#101027
… r=fee1-dead

Recover from using `;` as separator between fields

Partially fixes rust-lang#101440 (only for record structs).

Doing that for tuple structs is harder as their parsing passes through a bunch of helper functions. I don't know how to do that. But [their error message is better anyway](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=cc6ee8bb2593596c0cea89d49e79bcb4) and suggests using a comma, even if it doesn't suggest replacing the semicolon with it.
…GuillaumeGomez

Rustdoc-Json: Store Variant Fields as their own item.

Closes rust-lang#100587
Closes rust-lang#92945

Successor to rust-lang#100762

Unlike that one, we don't have merge `StructType` and `Variant`, as after rust-lang#101386 `Variant` stores enum specific information (discriminant).

Resolves the naming discussion (rust-lang#100762 (comment)) by having seperate enums for struct and enum kinds

Resolves `#[doc(hidden)]` on tuple structs (rust-lang#100762 (comment)) by storing as a `Vec<Option<Id>>`

r? `@GuillaumeGomez`
…t-too, r=oli-obk

Report number of delayed bugs properly with `-Ztreat-err-as-bug`

Report the number of delayed bugs that went into the `-Ztreat-errr-as-bug=N` being triggered, even if we don't count it in the err_count in regular diagnostic output.

Sometimes we have a session that creates a few diagnostics, perhaps: Error, Delay bug, Error, then Delay bug.
If I ran `-Ztreat-err-as-bug=3`, then I will now see "aborting after 2 errors and 1 delayed bugs" instead of just "after 2 errors" which is confusing since I passed `3`.
…=lqd

Add more size assertions for MIR types.

And move them into a module, as has been done previously for AST, HIR,
etc.

r? `@lqd`
@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-rustdoc-json Area: Rustdoc JSON backend A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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 Sep 6, 2022
@GuillaumeGomez
Copy link
Member Author

@bors r+ p=5 rollup=never

@bors
Copy link
Contributor

bors commented Sep 6, 2022

📌 Commit f21b612 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@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 Sep 6, 2022
@bors
Copy link
Contributor

bors commented Sep 6, 2022

⌛ Testing commit f21b612 with merge 78a891d...

@bors
Copy link
Contributor

bors commented Sep 6, 2022

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing 78a891d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 6, 2022
@bors bors merged commit 78a891d into rust-lang:master Sep 6, 2022
@rustbot rustbot added this to the 1.65.0 milestone Sep 6, 2022
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Perf Build Sha
#101473 cbb22d186bb132025c43cfdd3a7380406ba8bb32
#101471 99024dddd487baec5cb8f26dc569f1b77305c0b7
#101462 c96b227b7fddbae6e5db7b90f4f15d2cabfbf9d8
#101457 a23acc546b1aaec78725899b549c470b8475069b
#101445 b0f00ea3fe4602dc7849798a8493d7ab49c4b01c
#101434 3d29dd58a30087fa03c7f2c1102c2e5e6816e6a4
#101357 f42bfe2e453e6d14edd849892b8235e8867970bd

previous master: 380addd7d2

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (78a891d): comparison URL.

Overall result: ❌ regressions - ACTION NEEDED

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
cc @rust-lang/wg-compiler-performance

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
0.9% [0.3%, 1.6%] 15
Regressions ❌
(secondary)
1.2% [0.8%, 1.6%] 9
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.9% [0.3%, 1.6%] 15

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.5% [1.2%, 4.3%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
2.1% [2.1%, 2.1%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.1% [2.1%, 2.1%] 1

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

@rustbot rustbot added the perf-regression Performance regression. label Sep 6, 2022
@nnethercote
Copy link
Contributor

This is almost certainly perf-neutral. Unfortunately, several benchmarks (html5ever, serde_derive, tt-muncher) are bimodal at the moment and giving misleading results.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Sep 7, 2022
@GuillaumeGomez GuillaumeGomez deleted the rollup-68p9di4 branch September 7, 2022 08:50
@davidtwco davidtwco removed the A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic label Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-rustdoc-json Area: Rustdoc JSON backend 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.