diff options
| author | Zalathar <Zalathar@users.noreply.github.com> | 2024-05-30 13:16:07 +1000 |
|---|---|---|
| committer | Zalathar <Zalathar@users.noreply.github.com> | 2024-05-30 13:16:07 +1000 |
| commit | c671eaaaffcd4204573d96cb6085863bb83dcfbe (patch) | |
| tree | ce1ef504f7307f99f0a2a893199fe7b23c92ccbd /compiler/rustc_codegen_llvm/src/coverageinfo/ffi.rs | |
| parent | 23ea77b8edc902f4a90cda62af66f8b300e5de54 (diff) | |
| download | rust-c671eaaaffcd4204573d96cb6085863bb83dcfbe.tar.gz rust-c671eaaaffcd4204573d96cb6085863bb83dcfbe.zip | |
coverage: Rename MC/DC `conditions_num` to `num_conditions`
This value represents a quantity of conditions, not an ID, so the new spelling is more appropriate.
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 } } } } |
