File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
compiler/rustc_middle/src/mir Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -361,11 +361,16 @@ pub enum StatementKind<'tcx> {
361
361
/// Disallowed after drop elaboration.
362
362
AscribeUserType ( Box < ( Place < ' tcx > , UserTypeProjection ) > , ty:: Variance ) ,
363
363
364
- /// Marks the start of a "coverage region", injected with '-Cinstrument-coverage'. A
365
- /// `Coverage` statement carries metadata about the coverage region, used to inject a coverage
366
- /// map into the binary. If `Coverage::kind` is a `Counter`, the statement also generates
367
- /// executable code, to increment a counter variable at runtime, each time the code region is
368
- /// executed.
364
+ /// Carries control-flow-sensitive information injected by `-Cinstrument-coverage`,
365
+ /// such as where to generate physical coverage-counter-increments during codegen.
366
+ ///
367
+ /// Coverage statements are used in conjunction with the coverage mappings and other
368
+ /// information stored in the function's
369
+ /// [`mir::Body::function_coverage_info`](crate::mir::Body::function_coverage_info).
370
+ /// (For inlined MIR, take care to look up the *original function's* coverage info.)
371
+ ///
372
+ /// Interpreters and codegen backends that don't support coverage instrumentation
373
+ /// can usually treat this as a no-op.
369
374
Coverage ( Box < Coverage > ) ,
370
375
371
376
/// Denotes a call to an intrinsic that does not require an unwind path and always returns.
You can’t perform that action at this time.
0 commit comments