]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/coverage-experiments/src/for_with_comments.rs
explained lang_item function body (count_code_region)
[rust.git] / src / test / codegen / coverage-experiments / src / for_with_comments.rs
1 /*                   */ #[inline(always)]
2 /*                   */ pub fn __incr_cov<T>(_region_loc: &str, /*index: u32,*/ result: T) -> T {
3 /*                   */     result
4 /*                   */ }
5 /*                   */
6 /*    -              */ fn main() {
7 /*    :   I          */     for countdown in __incr_cov("start", 10..0) { // span is just the while test expression
8 /*    :   ┃          */         let _ = countdown;
9 /*    :   ┃          */         __incr_cov("top of for", ());
10 /*    ┃   -          */     }
11 /*    -              */ }
12
13
14 // -Z unpretty=val -- present the input source, unstable (and less-pretty) variants;
15 // valid types are any of the types for `--pretty`, as well as:
16 // `expanded`, `expanded,identified`,
17 // `expanded,hygiene` (with internal representations),
18 // `everybody_loops` (all function bodies replaced with `loop {}`),
19 // `hir` (the HIR), `hir,identified`,
20 // `hir,typed` (HIR with types for each node),
21 // `hir-tree` (dump the raw HIR),
22 // `mir` (the MIR), or `mir-cfg` (graphviz formatted MIR)
23
24 // argument to `pretty` must be one of `normal`, `expanded`, `identified`, or `expanded,identified`