diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-05-30 10:23:09 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-30 10:23:09 +0200 |
| commit | 479d6cafb74f4640a46cd26e147fbb37e9c1deb6 (patch) | |
| tree | 7746348dda859736fe09cb494ce66846bba80f03 /compiler/rustc_codegen_llvm/src/coverageinfo/ffi.rs | |
| parent | 5e83248a814aaaaf16aa5b14f6edf69066ad6c88 (diff) | |
| parent | c671eaaaffcd4204573d96cb6085863bb83dcfbe (diff) | |
| download | rust-479d6cafb74f4640a46cd26e147fbb37e9c1deb6.tar.gz rust-479d6cafb74f4640a46cd26e147fbb37e9c1deb6.zip | |
Rollup merge of #125754 - Zalathar:conditions-num, r=lqd
coverage: Rename MC/DC `conditions_num` to `num_conditions` Updated version of #124571, without the other changes that were split out into #125108 and #125700. This value represents a quantity of conditions, not an ID, so the new spelling is more appropriate. Some of the code touched by this PR could perhaps use some other changes, but I would prefer to keep this PR as a simple renaming and avoid scope creep. `@rustbot` label +A-code-coverage
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/coverageinfo/ffi.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/coverageinfo/ffi.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_llvm/src/coverageinfo/ffi.rs b/compiler/rustc_codegen_llvm/src/coverageinfo/ffi.rs index 12a846a49ec..584d033d6bd 100644 --- a/compiler/rustc_codegen_llvm/src/coverageinfo/ffi.rs +++ b/compiler/rustc_codegen_llvm/src/coverageinfo/ffi.rs @@ -118,7 +118,7 @@ pub mod mcdc { #[derive(Clone, Copy, Debug, Default)] pub struct DecisionParameters { bitmap_idx: u32, - conditions_num: u16, + num_conditions: u16, } // ConditionId in llvm is `unsigned int` at 18 while `int16_t` at [19](https://github.com/llvm/llvm-project/pull/81257) @@ -177,8 +177,9 @@ pub mod mcdc { } impl From<DecisionInfo> for DecisionParameters { - fn from(value: DecisionInfo) -> Self { - Self { bitmap_idx: value.bitmap_idx, conditions_num: value.conditions_num } + fn from(info: DecisionInfo) -> Self { + let DecisionInfo { bitmap_idx, num_conditions } = info; + Self { bitmap_idx, num_conditions } } } } |
