Skip to content

MC/DC Coverage re-introduction (1/3): THIR data gathering - #161222

Open
RenjiSann wants to merge 4 commits into
rust-lang:mainfrom
RenjiSann:mcdc-step-thir
Open

MC/DC Coverage re-introduction (1/3): THIR data gathering#161222
RenjiSann wants to merge 4 commits into
rust-lang:mainfrom
RenjiSann:mcdc-step-thir

Conversation

@RenjiSann

Copy link
Copy Markdown
Contributor

Tracking issue: rust-lang/goals#638

Identify MC/DC decision in the AST form, to allow for incoming instrumentation and mappings creation.

  1. Introduce a -Z coverage-options=mcdc flag
  2. Detect boolean expressions in THIR to:
    1. Gather sufficient data to construct MC/DC decisions;
    2. Emit block markers in MIR to track the expressions and instrument them

r? @davidtwco

@rustbot

rustbot commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in match lowering

cc @Nadrieril

Some changes occurred in coverage instrumentation.

cc @Zalathar

Some changes occurred in coverage instrumentation.

cc @Zalathar

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 17, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job tidy failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
fmt: checked 7163 files
tidy check
tidy [rustdoc_json (src)]: `rustdoc-json-types` modified, checking format version
tidy: Skipping binary file check, read-only filesystem
tidy [style (compiler)]: /checkout/compiler/rustc_middle/src/mir/coverage.rs:235: 14-line comment block with odd number of backticks
tidy [style (compiler)]: FAIL
removing old virtual environment
creating virtual environment at '/checkout/obj/build/venv' using 'python3.12' and 'venv'
Requirement already satisfied: pip in ./build/venv/lib/python3.12/site-packages (24.0)
Collecting pip
  Downloading pip-26.2.1-py3-none-any.whl.metadata (4.6 kB)
---
typechecking javascript files
tidy: The following check failed: style (compiler)
Bootstrap failed while executing `test src/tools/tidy tidyselftest --extra-checks=py,cpp,js,spellcheck`
Currently active steps:
test::Tidy {  } at src/bootstrap/src/core/build_steps/test.rs:1661
Command `/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools-bin/rust-tidy --root-path=/checkout --cargo-path=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo --output-dir=/checkout/obj/build --concurrency=4 --npm-path=/node/bin/yarn --ci=true --extra-checks=py,cpp,js,spellcheck` failed with exit code 1
Created at: src/bootstrap/src/core/build_steps/tool.rs:1626:23
Executed at: src/bootstrap/src/core/build_steps/test.rs:1743:29

Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:02:39
  local time: Mon Aug 17 16:33:29 UTC 2026
  network time: Mon, 17 Aug 2026 16:33:29 GMT
##[error]Process completed with exit code 1.
##[group]Run echo "disk usage:"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants