-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 10 pull requests #122417
Closed
Closed
Rollup of 10 pull requests #122417
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Before, the SwitchInt cases were computed in two passes: if the first pass accepted e.g. 0..=5 and then 1, the second pass would not accept 0..=5 anymore because 1 would be listed in the SwitchInt options. Now there's a single pass, so if we sort 0..=5 we must take care to not sort a subsequent 1.
Right now this is just `self.fields.len()` but that'll change in the next commit. `arity` will be useful for the `Debug` impl.
Breaks type metadata identifiers tests into smaller set of tests/files.
This new nightly-only flag can be used to toggle fine-grained flags that control the details of coverage instrumentation. Currently the only supported flag value is `branch` (or `no-branch`), which is a placeholder for upcoming support for branch coverage. Other flag values can be added in the future, to prototype proposed new behaviour, or to enable special non-default behaviour.
pattern analysis: Store field indices in `DeconstructedPat` to avoid virtual wildcards For a pattern like `Struct { field3: true, .. }`, in pattern analysis we represent it as `Struct { field1: _, field2: _, field3: true, field4: _ }`. This PR makes it so we store `Struct { field3: true, .. }` instead. This means we never have to create fake `_` patterns during lowering. r? `@compiler-errors`
…on, r=matthewjasper match lowering: don't collect test alternatives ahead of time I'm very happy with this one. Before this, when sorting candidates into the possible test branches, we manually computed `usize` indices to determine in which branch each candidate goes. To make this work we had a first pass that collected the possible alternatives we'd have to deal with, and a second pass that actually sorts the candidates. In this PR, I replace `usize` indices with a dedicated enum. This makes `sort_candidates` easier to follow, and we don't need the first pass anymore. r? `@matthewjasper`
…celinval Add `intrinsic_name` to get plain intrinsic name Add an `intrinsic_name` API to retrieve the plain intrinsic name. The plain name does not include type arguments (as `trimmed_name` does), which is more convenient to match with intrinsic symbols.
…hercote coverage: Remove or migrate all unstable values of `-Cinstrument-coverage` (This PR was substantially overhauled from its original version, which migrated all of the existing unstable values intact.) This PR takes the three nightly-only values that are currently accepted by `-Cinstrument-coverage`, completely removes two of them (`except-unused-functions` and `except-unused-generics`), and migrates the third (`branch`) over to a newly-introduced unstable flag `-Zcoverage-options`. I have a few motivations for wanting to do this: - It's unclear whether anyone actually uses the `except-unused-*` values, so this serves as an opportunity to either remove them, or prompt existing users to object to their removal. - After rust-lang#117199, the stable values of `-Cinstrument-coverage` treat it as a boolean-valued flag, so having nightly-only extra values feels out-of-place. - Nightly-only values also require extra ad-hoc code to make sure they aren't accidentally exposed to stable users. - The new system allows multiple different settings to be toggled independently, which isn't possible in the current single-value system. - The new system makes it easier to introduce new behaviour behind an unstable toggle, and then gather nightly-user feedback before possibly making it the default behaviour for all users. - The new system also gives us a convenient place to put relatively-narrow options that won't ever be the default, but that nightly users might still want access to. - It's likely that we will eventually want to give stable users more fine-grained control over coverage instrumentation. The new flag serves as a prototype of what that stable UI might eventually look like. The `branch` option is a placeholder that currently does nothing. It will be used by rust-lang#122322 to opt into branch coverage instrumentation. --- I see `-Zcoverage-options` as something that will exist more-or-less indefinitely, though individual sub-options might come and go as appropriate. I think there will always be some demand for nightly-only toggles, so I don't see `-Zcoverage-options` itself ever being stable, though we might eventually stabilize something similar to it.
…ttmcm Use `min_exhaustive_patterns` in core & std [`min_exhaustive_patterns`](rust-lang#119612) provides a subset of the functionality of [`exhaustive_patterns`](rust-lang#51085) which is likely to be stabilized much earlier than the full feature. The subset covers all the compiler and std use cases. `compiler/` [already uses it](rust-lang@9dd6eda); this PR switches `std` over.
…ompiler-errors Don't Create `ParamCandidate` When Obligation Contains Errors Fixes rust-lang#121941 I'm not sure if I understand this correctly but this bug was caused by an error type incorrectly matching against `ParamCandidate`. This was introduced by the changes made in rust-lang#72621 (figured using cargo-bisect-rustc). This PR fixes it by skipping `ParamCandidate` generation when an error type is involved. Also, this is similar to rust-lang#73005 but addresses `ParamCandidate` instead of `ImplCandidate`.
…smaller-files, r=compiler-errors CFI: Break tests into smaller files Breaks type metadata identifiers tests into smaller set of tests/files.
…kh726 Enable PR tracking review assignment for rust-lang/rust This flag enables tracking pull requests review assignment to Rust contributors. The URL pointing to the documentation will become real once rust-lang/rust-forge#729 is merged r? `@jackh726` cc: `@Mark-Simulacrum`
Move `Once` implementations to `sys` Part of rust-lang#117276.
Fix ICE in diagnostics for parenthesized type arguments The second time is the charm 🤞 😁 Fixes rust-lang#122345 r? fmease
rustbot
added
the
A-meta
Area: Issues & PRs about the rust-lang/rust repository itself
label
Mar 13, 2024
rustbot
added
O-wasi
Operating system: Wasi, Webassembly System Interface
O-wasm
Target: WASM (WebAssembly), http://webassembly.org/
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
rollup
A PR which is a rollup
labels
Mar 13, 2024
@bors r+ rollup=never p=10 |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Mar 13, 2024
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 13, 2024
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#121820 (pattern analysis: Store field indices in `DeconstructedPat` to avoid virtual wildcards) - rust-lang#121908 (match lowering: don't collect test alternatives ahead of time) - rust-lang#122203 (Add `intrinsic_name` to get plain intrinsic name) - rust-lang#122226 (coverage: Remove or migrate all unstable values of `-Cinstrument-coverage`) - rust-lang#122255 (Use `min_exhaustive_patterns` in core & std) - rust-lang#122360 ( Don't Create `ParamCandidate` When Obligation Contains Errors ) - rust-lang#122375 (CFI: Break tests into smaller files) - rust-lang#122383 (Enable PR tracking review assignment for rust-lang/rust) - rust-lang#122386 (Move `Once` implementations to `sys`) - rust-lang#122400 (Fix ICE in diagnostics for parenthesized type arguments) r? `@ghost` `@rustbot` modify labels: rollup
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
bors
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Mar 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-meta
Area: Issues & PRs about the rust-lang/rust repository itself
O-wasi
Operating system: Wasi, Webassembly System Interface
O-wasm
Target: WASM (WebAssembly), http://webassembly.org/
rollup
A PR which is a rollup
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
DeconstructedPat
to avoid virtual wildcards #121820 (pattern analysis: Store field indices inDeconstructedPat
to avoid virtual wildcards)intrinsic_name
to get plain intrinsic name #122203 (Addintrinsic_name
to get plain intrinsic name)-Cinstrument-coverage
#122226 (coverage: Remove or migrate all unstable values of-Cinstrument-coverage
)min_exhaustive_patterns
in core & std #122255 (Usemin_exhaustive_patterns
in core & std)ParamCandidate
When Obligation Contains Errors #122360 ( Don't CreateParamCandidate
When Obligation Contains Errors )Once
implementations tosys
#122386 (MoveOnce
implementations tosys
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup