1 1| |#![allow(unused_assignments, unused_variables, while_true)]
3 3| |// This test confirms that (1) unexecuted infinite loops are handled correctly by the
4 4| |// InstrumentCoverage MIR pass; and (2) Counter Expressions that subtract from zero can be dropped.
8 8| |impl std::fmt::Debug for DebugTest {
9 9| 1| fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
15 15| 1| write!(f, "cool")?;
20 19| 10| for i in 0..10 {
25 24| 10| write!(f, "cool")?;
34 32| |struct DisplayTest;
36 34| |impl std::fmt::Display for DisplayTest {
37 35| 1| fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
43 41| 1| write!(f, "cool")?;
46 43| 10| for i in 0..10 {
52 49| 10| write!(f, "cool")?;
61 57| 1| let debug_test = DebugTest;
62 58| 1| println!("{:?}", debug_test);
63 59| 1| let display_test = DisplayTest;
64 60| 1| println!("{}", display_test);