-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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 #118300
Rollup of 7 pull requests #118300
Conversation
This lets us avoid creating two copies of the node's branch list.
Now that this code path unconditionally calls `make_branch_counters`, we might as well make that method responsible for creating the node's counter as well, since it needs the resulting term anyway.
This means that we no longer have to manage the distinction between `BcbCounter` and `CovTerm` when preparing expressions.
In some cases we need to prepare a coverage expression that is the sum of an arbitrary number of other terms. This patch simplifies the code paths that build those sums. This causes some churn in the mappings, because the previous code was building its sums in a somewhat idiosyncratic order.
This was previously a helper method in `MakeBcbCounters`, but putting it in the graph lets us call it from `BcbBranch`, and gives us a more fine-grained borrow.
`BcbBranch` represented an out-edge of a coverage graph node, but would silently refer to a node instead in cases where that node only had one in-edge. Instead we now refer to a graph edge as a `(from_bcb, to_bcb)` pair, or sometimes as just one of those nodes when the other node is implied by the surrounding context. The case of sole in-edges is handled by special code added directly to `get_or_make_edge_counter_operand`.
This explains why we don't have to worry about bcb0 having multiple in-edges.
It's empty, and it doesn't even make sense, because `rustc_error_messages` is a lower-level crate than `rustc_errors`.
The `fluent_messages!` macro produces uses of `crate::{D,Subd}iagnosticMessage`, which means that every crate using the macro must have this import: ``` use rustc_errors::{DiagnosticMessage, SubdiagnosticMessage}; ``` This commit changes the macro to instead use `rustc_errors::{D,Subd}iagnosticMessage`, which avoids the need for the imports.
Currently we always do this: ``` use rustc_fluent_macro::fluent_messages; ... fluent_messages! { "./example.ftl" } ``` But there is no need, we can just do this everywhere: ``` rustc_fluent_macro::fluent_messages! { "./example.ftl" } ``` which is shorter.
coverage: Simplify building coverage expressions based on sums This is a combination of some interlinked changes to the code that creates coverage counters/expressions for nodes and edges in the coverage graph: - Some preparatory cleanups in `MakeBcbCounters::make_branch_counters` - Use `BcbCounter` (instead of `CovTerm`) when building coverage expressions - This makes it easier to introduce a fold for building sums - Simplify the creation of coverage expressions based on sums, by having `Iterator::fold` do much of the work - Get rid of the awkward `BcbBranch` enum, and replace it with graph edges represented as `(from_bcb, to_bcb)` - This further simplifies the body of the fold
…lnay Stabilize `ptr::addr_eq` This PR stabilize the `ptr_addr_eq` library feature, representing: ```rust // core::ptr pub fn addr_eq<T: ?Sized, U: ?Sized>(p: *const T, q: *const U) -> bool; ``` FCP has already started [on the tracking issue](rust-lang#116324 (comment)) and is waiting on the final period comment. Note: stabilizing this feature is somewhat of requirement for a new T-lang lint, cf. rust-lang#117758 (comment).
…ate, r=compiler-errors Reduce fluent boilerplate Best reviewed one commit at a time. r? `@davidtwco`
… r=cjgillot Miscellaneous `ObligationCauseCode` cleanups Remove some dead code/unused `ObligationCauseCode`s.
…,dtolnay Use `is_{some,ok}_and` more in the compiler slightly more fluent-reading code
…c, r=fmease `is_{some,ok}_and` for rustdoc slightly more fluent-reading code r? fmease
…d, r=aliemjay Don't ICE when encountering placeholders in implied bounds computation I *could* fix this the right way, though I don't really want to think about the implications of the change. This should have minimal side-effects. r? `@aliemjay` Fixes rust-lang#118286
@bors r+ rollup=never p=7 |
…mpiler-errors Rollup of 7 pull requests Successful merges: - rust-lang#117651 (coverage: Simplify building coverage expressions based on sums) - rust-lang#117968 (Stabilize `ptr::addr_eq`) - rust-lang#118158 (Reduce fluent boilerplate) - rust-lang#118201 (Miscellaneous `ObligationCauseCode` cleanups) - rust-lang#118288 (Use `is_{some,ok}_and` more in the compiler) - rust-lang#118289 (`is_{some,ok}_and` for rustdoc) - rust-lang#118290 (Don't ICE when encountering placeholders in implied bounds computation) r? `@ghost` `@rustbot` modify labels: rollup
💔 Test failed - checks-actions |
Spurious @bors retry |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: ee80c8d0a8 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (33f6af8): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 672.939s -> 674.797s (0.28%) |
Successful merges:
ptr::addr_eq
#117968 (Stabilizeptr::addr_eq
)ObligationCauseCode
cleanups #118201 (MiscellaneousObligationCauseCode
cleanups)is_{some,ok}_and
more in the compiler #118288 (Useis_{some,ok}_and
more in the compiler)is_{some,ok}_and
for rustdoc #118289 (is_{some,ok}_and
for rustdoc)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup