]> git.lizzy.rs Git - rust.git/blob - src/test/run-make-fulldeps/coverage-reports/expected_show_coverage.inner_items.txt
Auto merge of #84997 - pietroalbini:ci-verify-channel, r=Mark-Simulacrum
[rust.git] / src / test / run-make-fulldeps / coverage-reports / expected_show_coverage.inner_items.txt
1     1|       |#![allow(unused_assignments, unused_variables, dead_code)]
2     2|       |
3     3|      1|fn main() {
4     4|      1|    // Initialize test constants in a way that cannot be determined at compile time, to ensure
5     5|      1|    // rustc and LLVM cannot optimize out statements (or coverage counters) downstream from
6     6|      1|    // dependent conditions.
7     7|      1|    let is_true = std::env::args().len() == 1;
8     8|      1|
9     9|      1|    let mut countdown = 0;
10    10|      1|    if is_true {
11    11|      1|        countdown = 10;
12    12|      1|    }
13                    ^0
14    13|       |
15    14|       |    mod in_mod {
16    15|       |        const IN_MOD_CONST: u32 = 1000;
17    16|       |    }
18    17|       |
19    18|      3|    fn in_func(a: u32) {
20    19|      3|        let b = 1;
21    20|      3|        let c = a + b;
22    21|      3|        println!("c = {}", c)
23    22|      3|    }
24    23|       |
25    24|       |    struct InStruct {
26    25|       |        in_struct_field: u32,
27    26|       |    }
28    27|       |
29    28|       |    const IN_CONST: u32 = 1234;
30    29|       |
31    30|       |    trait InTrait {
32    31|       |        fn trait_func(&mut self, incr: u32);
33    32|       |
34    33|      1|        fn default_trait_func(&mut self) {
35    34|      1|            in_func(IN_CONST);
36    35|      1|            self.trait_func(IN_CONST);
37    36|      1|        }
38    37|       |    }
39    38|       |
40    39|       |    impl InTrait for InStruct {
41    40|      1|        fn trait_func(&mut self, incr: u32) {
42    41|      1|            self.in_struct_field += incr;
43    42|      1|            in_func(self.in_struct_field);
44    43|      1|        }
45    44|       |    }
46    45|       |
47    46|       |    type InType = String;
48    47|       |
49    48|      1|    if is_true {
50    49|      1|        in_func(countdown);
51    50|      1|    }
52                    ^0
53    51|       |
54    52|      1|    let mut val = InStruct {
55    53|      1|        in_struct_field: 101,
56    54|      1|    };
57    55|      1|
58    56|      1|    val.default_trait_func();
59    57|      1|}
60