1 1| |#![allow(unused_assignments, unused_variables)] 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 a, mut b, mut c) = (0, 0, 0); 10 10| 1| if is_true { 11 11| 1| a = 1; 12 12| 1| b = 10; 13 13| 1| c = 100; 14 14| 1| } 15 ^0 16 15| | let 17 16| 1| somebool 18 17| | = 19 18| 1| a < b 20 19| | || 21 20| 0| b < c 22 21| | ; 23 22| | let 24 23| 1| somebool 25 24| | = 26 25| 1| b < a 27 26| | || 28 27| 1| b < c 29 28| | ; 30 29| 1| let somebool = a < b && b < c; 31 30| 1| let somebool = b < a && b < c; 32 ^0 33 31| | 34 32| | if 35 33| 1| ! 36 34| 1| is_true 37 35| 0| { 38 36| 0| a = 2 39 37| 0| ; 40 38| 1| } 41 39| | 42 40| | if 43 41| 1| is_true 44 42| 1| { 45 43| 1| b = 30 46 44| 1| ; 47 45| 1| } 48 46| | else 49 47| 0| { 50 48| 0| c = 400 51 49| 0| ; 52 50| 0| } 53 51| | 54 52| 1| if !is_true { 55 53| 0| a = 2; 56 54| 1| } 57 55| | 58 56| 1| if is_true { 59 57| 1| b = 30; 60 58| 1| } else { 61 59| 0| c = 400; 62 60| 0| } 63 61| 1|} 64 65