Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 09489b9

Browse files
authored
Rollup merge of rust-lang#111121 - Zalathar:ra-false-positive, r=jackh726
Work around `rust-analyzer` false-positive type errors rust-analyzer incorrectly reports two type errors in `debug.rs`: > expected &dyn Display, found &i32 > expected &dyn Display, found &i32 This is due to a known bug in r-a: (rust-lang/rust-analyzer#11847). In these particular cases, changing `&0` to `&0i32` seems to be enough to avoid the bug.
2 parents 97d3280 + 5494eec commit 09489b9

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_mir_transform/src/coverage

1 file changed

+2
-2
lines changed

compiler/rustc_mir_transform/src/coverage/debug.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ pub(super) fn dump_coverage_spanview<'tcx>(
639639
let def_id = mir_source.def_id();
640640

641641
let span_viewables = span_viewables(tcx, mir_body, basic_coverage_blocks, &coverage_spans);
642-
let mut file = create_dump_file(tcx, "html", false, pass_name, &0, mir_body)
642+
let mut file = create_dump_file(tcx, "html", false, pass_name, &0i32, mir_body)
643643
.expect("Unexpected error creating MIR spanview HTML file");
644644
let crate_name = tcx.crate_name(def_id.krate);
645645
let item_name = tcx.def_path(def_id).to_filename_friendly_no_crate();
@@ -740,7 +740,7 @@ pub(super) fn dump_coverage_graphviz<'tcx>(
740740
.join("\n ")
741741
));
742742
}
743-
let mut file = create_dump_file(tcx, "dot", false, pass_name, &0, mir_body)
743+
let mut file = create_dump_file(tcx, "dot", false, pass_name, &0i32, mir_body)
744744
.expect("Unexpected error creating BasicCoverageBlock graphviz DOT file");
745745
graphviz_writer
746746
.write_graphviz(tcx, &mut file)

0 commit comments

Comments
 (0)