-
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 7 pull requests #99078
Merged
Merged
Rollup of 7 pull requests #99078
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
DWARF version 5 brings a number of improvements over version 4. Quoting from the announcement [1]: > Version 5 incorporates improvements in many areas: better data compression, > separation of debugging data from executable files, improved description of > macros and source files, faster searching for symbols, improved debugging > optimized code, as well as numerous improvements in functionality and > performance. On platforms where DWARF version 5 is supported (Linux, primarily), this commit adds support for it behind a new `-Z dwarf-version=5` flag. [1]: https://dwarfstd.org/Public_Review.php
Updates rust-lang#32976. Updates rust-lang#99069.
The deriving code has inconsistent terminology to describe args. In some places it distinguishes between: - the `&self` arg (if present), versus - all other args. In other places it distinguishes between: - the `&self` arg (if present) and any other arguments with the same type (in practice there is at most one, e.g. in `PartialEq::eq`), versus - all other args. The terms "self_args" and "nonself_args" are sometimes used for the former distinction, and sometimes for the latter. "args" is also sometimes used for "all other args". This commit makes the code consistently uses "self_args"/"nonself_args" for the former and "selflike_args"/"nonselflike_args" for the latter. This change makes the code easier to read. The commit also adds a panic on an impossible path (the `Self_` case) in `extract_arg_details`.
Use `self_exprs` and `other_selflike_exprs` in a manner similar to the previous commit.
It's unused. This also removes the need for the lifetime on `FieldInfo`, which is nice.
The deriving code has some complex parts involving iterations over selflike args and also fields within structs and enum variants. The return types for a few functions demonstrate this: - `TraitDef::create_{struct_pattern,enum_variant_pattern}` returns a `(P<ast::Pat>, Vec<(Span, Option<Ident>, P<Expr>)>)` - `TraitDef::create_struct_field_accesses` returns a `Vec<(Span, Option<Ident>, P<Expr>)>`. This results in per-field data stored within per-selflike-arg data, with lots of repetition within the per-field data elements. This then has to be "transposed" in two places (`expand_struct_method_body` and `expand_enum_method_body`) into per-self-like-arg data stored within per-field data. It's all quite clumsy and confusing. This commit rearranges things greatly. Data is obtained in the needed form up-front, avoiding the need for transposition. Also, various functions are split, removed, and added, to make things clearer and avoid tuple return values. The diff is hard to read, which reflects the messiness of the original code -- there wasn't an easy way to break these changes into small pieces. (Sorry!) It's a net reduction of 35 lines and a readability improvement. The generated code is unchanged.
When deriving functions for zero-variant enums, we just generated a function body that calls `std::instrincs::unreachable`. There is a large comment with some not-very-useful historical discussion about alternatives, including some discussion of feature-gating zero-variant enums, which is clearly irrelevant today. This commit cuts the comment down greatly.
This makes `cs_cmp`, `cs_partial_cmp`, and `cs_op` (for `PartialEq`) more similar. It also fixes some out of date comments.
`cs_fold` has four distinct cases, covered by three different function arguments: - first field - combine current field with previous results - no fields - non-matching enum variants This commit clarifies things by replacing the three function arguments with one that takes a new `CsFold` type with four slightly different) cases - single field - combine result for current field with results for previous fields - no fields - non-matching enum variants This makes the code shorter and clearer.
Implement support for DWARF version 5. DWARF version 5 brings a number of improvements over version 4. Quoting from the announcement [1]: > Version 5 incorporates improvements in many areas: better data compression, > separation of debugging data from executable files, improved description of > macros and source files, faster searching for symbols, improved debugging > optimized code, as well as numerous improvements in functionality and > performance. On platforms where DWARF version 5 is supported (Linux, primarily), this commit adds support for it behind a new `-Z dwarf-version=5` flag. [1]: https://dwarfstd.org/Public_Review.php r? ``@michaelwoerister``
…r=Mark-Simulacrum Clarify deriving code A number of clarifications to the deriving code. r? ``@Mark-Simulacrum``
fix ICE in ConstProp Fixes rust-lang#96169
Adding suggestion for E0530 Closes rust-lang#98974
Collapse some weirdly-wrapping derives self-explanatory
…on, r=compiler-errors Remove a string comparison about types
…fJung Update integer_atomics tracking issue Updates rust-lang#32976. Updates rust-lang#99069. r? ``@RalfJung``
rustbot
added
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
Jul 9, 2022
@bors r+ rollup=never p=5 |
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
Jul 9, 2022
☀️ Test successful - checks-actions |
This was referenced Jul 9, 2022
Finished benchmarking commit (c4693bc): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
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.
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-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:
Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup