]> git.proxmox.com Git - rustc.git/blob - src/test/run-make-fulldeps/coverage-reports/expected_show_coverage.loops_branches.txt
New upstream version 1.50.0+dfsg1
[rustc.git] / src / test / run-make-fulldeps / coverage-reports / expected_show_coverage.loops_branches.txt
1 1| |#![allow(unused_assignments, unused_variables, while_true)]
2 2| |
3 3| |// This test confirms an earlier problem was resolved, supporting the MIR graph generated by the
4 4| |// structure of this `fmt` function.
5 5| |
6 6| |struct DebugTest;
7 7| |
8 8| |impl std::fmt::Debug for DebugTest {
9 9| 1| fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10 10| 1| if true {
11 11| 1| if false {
12 12| | while true {
13 13| | }
14 14| 1| }
15 15| 1| write!(f, "error")?;
16 ^0
17 16| | } else {
18 17| | }
19 18| 1| Ok(())
20 19| 1| }
21 20| |}
22 21| |
23 22| 1|fn main() {
24 23| 1| let debug_test = DebugTest;
25 24| 1| println!("{:?}", debug_test);
26 25| 1|}
27 26| |
28 27| |/*
29 28| |
30 29| |This is the error message generated, before the issue was fixed:
31 30| |
32 31| |error: internal compiler error: compiler/rustc_mir/src/transform/coverage/mod.rs:374:42:
33 32| |Error processing: DefId(0:6 ~ bug_incomplete_cov_graph_traversal_simplified[317d]::{impl#0}::fmt):
34 33| |Error { message: "`TraverseCoverageGraphWithLoops` missed some `BasicCoverageBlock`s:
35 34| |[bcb6, bcb7, bcb9]" }
36 35| |
37 36| |*/
38