forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#117651 - Zalathar:fold-sums, r=cjgillot 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
- Loading branch information
Showing
8 changed files
with
270 additions
and
305 deletions.
There are no files selected for viewing
309 changes: 143 additions & 166 deletions
309
compiler/rustc_mir_transform/src/coverage/counters.rs
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
Oops, something went wrong.