diff --git a/compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs b/compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs index 42164c5af48cc..b33e6dbb3409a 100644 --- a/compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs +++ b/compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs @@ -111,7 +111,7 @@ impl<'tcx> CoverageInfoBuilderMethods<'tcx> for Builder<'_, '_, 'tcx> { }; match *kind { - CoverageKind::SpanMarker | CoverageKind::BlockMarker { .. } => unreachable!( + CoverageKind::Point { .. } | CoverageKind::BlockMarker { .. } => unreachable!( "marker statement {kind:?} should have been removed by CleanupPostBorrowck" ), CoverageKind::VirtualCounter { bcb } diff --git a/compiler/rustc_middle/src/mir/coverage.rs b/compiler/rustc_middle/src/mir/coverage.rs index c0b997ec94a12..e48ee0068c300 100644 --- a/compiler/rustc_middle/src/mir/coverage.rs +++ b/compiler/rustc_middle/src/mir/coverage.rs @@ -3,6 +3,7 @@ use std::fmt::{self, Debug, Formatter}; use rustc_data_structures::fx::FxIndexMap; +use rustc_hir::HirId; use rustc_index::{Idx, IndexVec}; use rustc_macros::{StableHash, TyDecodable, TyEncodable}; use rustc_span::Span; @@ -70,13 +71,24 @@ impl Debug for CovTerm { } } +/// The specific relationship between [`CoverageKind::Point`] and its [`HirId`]. +#[derive(Clone, Copy, Debug, PartialEq, TyEncodable, TyDecodable, StableHash)] +pub enum PointKind { + /// Inserted just before evaluating an expression. + Expr, + /// Inserted when a one-sided `if` expression generates its synthetic `else {}`. + /// The absent `else` has no node, so [`HirId`] is the `if` expression. + ImplicitElse, + /// Inserted at the end of a function's body. [`HirId`] is the function itself. + FunctionEnd, +} + #[derive(Clone, PartialEq, TyEncodable, TyDecodable, StableHash)] pub enum CoverageKind { - /// Marks a span that might otherwise not be represented in MIR, so that - /// coverage instrumentation can associate it with its enclosing block/BCB. - /// - /// Should be erased before codegen (at some point after `InstrumentCoverage`). - SpanMarker, + /// Associates a HIR node (such as an expression) with a particular point in + /// MIR control-flow. The relationship between the node and the point is + /// indicated by [`PointKind`]. Injected during MIR building. + Point { point_kind: PointKind, hir_id: HirId }, /// Marks its enclosing basic block with an ID that can be referred to by /// side data in [`CoverageEarlyInfo`]. @@ -94,11 +106,24 @@ pub enum CoverageKind { impl Debug for CoverageKind { fn fmt(&self, fmt: &mut Formatter<'_>) -> fmt::Result { - use CoverageKind::*; match self { - SpanMarker => write!(fmt, "SpanMarker"), - BlockMarker { id } => write!(fmt, "BlockMarker({:?})", id.index()), - VirtualCounter { bcb } => write!(fmt, "VirtualCounter({bcb:?})"), + CoverageKind::Point { point_kind, hir_id } => { + write!(fmt, "Point({point_kind:?}, {hir_id:?}") + } + CoverageKind::BlockMarker { id } => write!(fmt, "BlockMarker({:?})", id.index()), + CoverageKind::VirtualCounter { bcb } => write!(fmt, "VirtualCounter({bcb:?})"), + } + } +} + +impl CoverageKind { + /// Returns true if this kind of coverage statement is a marker inserted during + /// MIR building, for use by analysis in the `InstrumentCoverage` pass, and is + /// no longer needed after that pass. + pub fn is_removed_after_analysis(&self) -> bool { + match self { + CoverageKind::Point { .. } | CoverageKind::BlockMarker { .. } => true, + CoverageKind::VirtualCounter { .. } => false, } } } diff --git a/compiler/rustc_middle/src/mir/syntax.rs b/compiler/rustc_middle/src/mir/syntax.rs index 2d8c83700540b..4c4a16953d5ed 100644 --- a/compiler/rustc_middle/src/mir/syntax.rs +++ b/compiler/rustc_middle/src/mir/syntax.rs @@ -104,13 +104,14 @@ pub enum AnalysisPhase { /// * [`TerminatorKind::FalseEdge`] /// * [`StatementKind::FakeRead`] /// * [`StatementKind::AscribeUserType`] - /// * [`StatementKind::Coverage`] with [`CoverageKind::BlockMarker`] or - /// [`CoverageKind::SpanMarker`] + /// * [`StatementKind::Coverage`] with [`CoverageKind::is_removed_after_analysis`] /// * [`Rvalue::Ref`] with `BorrowKind::Fake` /// * [`CastKind::PointerCoercion`] with any of the following: /// * [`PointerCoercion::ArrayToPointer`] /// * [`PointerCoercion::MutToConstPointer`] /// + /// [`CoverageKind::is_removed_after_analysis`]: crate::mir::coverage::CoverageKind::is_removed_after_analysis + /// /// Furthermore, `Deref` projections must be the first projection within any place (if they /// appear at all) PostCleanup = 1, diff --git a/compiler/rustc_middle/src/thir.rs b/compiler/rustc_middle/src/thir.rs index a27c6bc43171d..e16f91f656386 100644 --- a/compiler/rustc_middle/src/thir.rs +++ b/compiler/rustc_middle/src/thir.rs @@ -257,6 +257,9 @@ pub struct Expr<'tcx> { /// The id of the HIR expression whose [temporary scope] should be used for this expression. /// + /// Also used by coverage instrumentation to recover the HIR node that corresponds to a THIR + /// expression node. + /// /// [temporary scope]: https://doc.rust-lang.org/reference/destructors.html#temporary-scopes pub temp_scope_id: hir::ItemLocalId, diff --git a/compiler/rustc_mir_build/src/builder/cfg.rs b/compiler/rustc_mir_build/src/builder/cfg.rs index fb8fa632f7983..63ccf323fc204 100644 --- a/compiler/rustc_mir_build/src/builder/cfg.rs +++ b/compiler/rustc_mir_build/src/builder/cfg.rs @@ -107,17 +107,6 @@ impl<'tcx> CFG<'tcx> { self.push(block, stmt); } - /// Adds a dummy statement whose only role is to associate a span with its - /// enclosing block for the purposes of coverage instrumentation. - /// - /// This results in more accurate coverage reports for certain kinds of - /// syntax (e.g. `continue` or `if !`) that would otherwise not appear in MIR. - pub(crate) fn push_coverage_span_marker(&mut self, block: BasicBlock, source_info: SourceInfo) { - let kind = StatementKind::Coverage(coverage::CoverageKind::SpanMarker); - let stmt = Statement::new(source_info, kind); - self.push(block, stmt); - } - pub(crate) fn terminate( &mut self, block: BasicBlock, diff --git a/compiler/rustc_mir_build/src/builder/coverageinfo.rs b/compiler/rustc_mir_build/src/builder/coverageinfo.rs index 09c32fe6008ca..bb45cb74ae74f 100644 --- a/compiler/rustc_mir_build/src/builder/coverageinfo.rs +++ b/compiler/rustc_mir_build/src/builder/coverageinfo.rs @@ -2,9 +2,12 @@ use std::assert_matches; use std::collections::hash_map::Entry; use rustc_data_structures::fx::FxHashMap; -use rustc_middle::mir::coverage::{BlockMarkerId, BranchSpan, CoverageEarlyInfo, CoverageKind}; -use rustc_middle::mir::{self, BasicBlock, SourceInfo, UnOp}; -use rustc_middle::thir::{ExprId, ExprKind, Pat, Thir}; +use rustc_hir::HirId; +use rustc_middle::mir::coverage::{ + BlockMarkerId, BranchSpan, CoverageEarlyInfo, CoverageKind, PointKind, +}; +use rustc_middle::mir::{self, BasicBlock, SourceInfo, Statement, UnOp}; +use rustc_middle::thir::{self, ExprId, ExprKind, Pat, Thir}; use rustc_middle::ty::TyCtxt; use rustc_span::def_id::LocalDefId; @@ -12,6 +15,9 @@ use crate::builder::{Builder, CFG}; /// Collects coverage-related information during MIR building, to eventually be /// turned into a function's [`CoverageEarlyInfo`] when MIR building is complete. +/// +/// FIXME(Zalathar): Now that we have [`CoverageKind::Point`], we should be able +/// to remove this and perform HIR-aware analysis during instrumentation instead. pub(crate) struct CoverageInfoBuilder { /// Maps condition expressions to their enclosing `!`, for better instrumentation. nots: FxHashMap, @@ -175,6 +181,73 @@ impl CoverageInfoBuilder { } impl<'tcx> Builder<'_, 'tcx> { + /// Does nothing if `-Cinstrument-coverage` is not enabled. + /// + /// Otherwise, pushes a marker statement to `block` indicating that this is where + /// the HIR expression `hir_id` is being evaluated. + pub(crate) fn push_coverage_point_for_expr( + &mut self, + block: BasicBlock, + source_info: SourceInfo, + hir_id: HirId, + ) { + if !self.tcx.sess.instrument_coverage() { + return; + } + self.push_coverage_point_inner(block, source_info, PointKind::Expr, hir_id); + } + + /// Does nothing if `-Cinstrument-coverage` is not enabled. + /// + /// Otherwise, pushes a marker statement to `block` indicating that this is where + /// the one-sided if-expression `if_expr` will generate its synthetic `else {}` + /// path, since it lacks an explicit `else` block. + pub(crate) fn push_coverage_point_for_implicit_else( + &mut self, + block: BasicBlock, + source_info: SourceInfo, + if_expr: &thir::Expr<'tcx>, + ) { + if !self.tcx.sess.instrument_coverage() { + return; + } + // Recover the full HirId by combining a local ID with the function's owner ID. + let hir_id = HirId { owner: self.hir_id.owner, local_id: if_expr.temp_scope_id }; + self.push_coverage_point_inner(block, source_info, PointKind::ImplicitElse, hir_id); + } + + /// Does nothing if `-Cinstrument-coverage` is not enabled. + /// + /// Otherwise, pushes a marker statement to `block` indicating that this is where + /// the function `fn_hir_id` would implicitly return at the end of its body. + pub(crate) fn push_coverage_point_for_fn_end( + &mut self, + block: BasicBlock, + source_info: SourceInfo, + fn_hir_id: HirId, + ) { + if !self.tcx.sess.instrument_coverage() { + return; + } + self.push_coverage_point_inner(block, source_info, PointKind::FunctionEnd, fn_hir_id); + } + + fn push_coverage_point_inner( + &mut self, + block: BasicBlock, + source_info: SourceInfo, + point_kind: PointKind, + hir_id: HirId, + ) { + assert!(self.tcx.sess.instrument_coverage()); + + let stmt = Statement::new( + source_info, + mir::StatementKind::Coverage(CoverageKind::Point { point_kind, hir_id }), + ); + self.cfg.push(block, stmt); + } + /// If condition coverage is enabled, inject extra blocks and marker statements /// that will let us track the value of the condition in `place`. pub(crate) fn visit_coverage_standalone_condition( diff --git a/compiler/rustc_mir_build/src/builder/expr/as_operand.rs b/compiler/rustc_mir_build/src/builder/expr/as_operand.rs index d2f06cc9d57b3..6d73e115acbd8 100644 --- a/compiler/rustc_mir_build/src/builder/expr/as_operand.rs +++ b/compiler/rustc_mir_build/src/builder/expr/as_operand.rs @@ -127,6 +127,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { let source_info = this.source_info(expr.span); let region_scope = (region_scope, source_info); return this.in_scope(region_scope, LintLevel::Explicit(hir_id), |this| { + this.push_coverage_point_for_expr(block, source_info, hir_id); this.as_operand(block, scope, value, local_info, needs_temporary) }); } @@ -170,6 +171,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { let source_info = this.source_info(expr.span); let region_scope = (region_scope, source_info); return this.in_scope(region_scope, LintLevel::Explicit(hir_id), |this| { + this.push_coverage_point_for_expr(block, source_info, hir_id); this.as_call_operand(block, scope, value) }); } diff --git a/compiler/rustc_mir_build/src/builder/expr/as_place.rs b/compiler/rustc_mir_build/src/builder/expr/as_place.rs index 22f424a724a81..839387c65be70 100644 --- a/compiler/rustc_mir_build/src/builder/expr/as_place.rs +++ b/compiler/rustc_mir_build/src/builder/expr/as_place.rs @@ -430,6 +430,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { match expr.kind { ExprKind::Scope { region_scope, hir_id, value } => { this.in_scope((region_scope, source_info), LintLevel::Explicit(hir_id), |this| { + this.push_coverage_point_for_expr(block, source_info, hir_id); this.expr_as_place(block, value, mutability, fake_borrow_temps) }) } diff --git a/compiler/rustc_mir_build/src/builder/expr/as_rvalue.rs b/compiler/rustc_mir_build/src/builder/expr/as_rvalue.rs index 76d9bd4d2ae45..7647bb7adc550 100644 --- a/compiler/rustc_mir_build/src/builder/expr/as_rvalue.rs +++ b/compiler/rustc_mir_build/src/builder/expr/as_rvalue.rs @@ -58,6 +58,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { ExprKind::Scope { region_scope, hir_id, value } => { let region_scope = (region_scope, source_info); this.in_scope(region_scope, LintLevel::Explicit(hir_id), |this| { + this.push_coverage_point_for_expr(block, source_info, hir_id); this.as_rvalue(block, scope, value) }) } diff --git a/compiler/rustc_mir_build/src/builder/expr/as_temp.rs b/compiler/rustc_mir_build/src/builder/expr/as_temp.rs index 2834e4e4dcb30..ca4bc95a71fb7 100644 --- a/compiler/rustc_mir_build/src/builder/expr/as_temp.rs +++ b/compiler/rustc_mir_build/src/builder/expr/as_temp.rs @@ -29,7 +29,10 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { return this.in_scope( (region_scope, source_info), LintLevel::Explicit(hir_id), - |this| this.as_temp(block, temp_lifetime, value, mutability), + |this| { + this.push_coverage_point_for_expr(block, source_info, hir_id); + this.as_temp(block, temp_lifetime, value, mutability) + }, ); } diff --git a/compiler/rustc_mir_build/src/builder/expr/into.rs b/compiler/rustc_mir_build/src/builder/expr/into.rs index d5ce1dab1b417..13fbb3a2c0c3c 100644 --- a/compiler/rustc_mir_build/src/builder/expr/into.rs +++ b/compiler/rustc_mir_build/src/builder/expr/into.rs @@ -48,6 +48,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { ExprKind::Scope { region_scope, hir_id, value } => { let region_scope = (region_scope, source_info); this.in_scope(region_scope, LintLevel::Explicit(hir_id), |this| { + this.push_coverage_point_for_expr(block, source_info, hir_id); this.expr_into_dest(destination, block, value) }) } @@ -117,6 +118,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { // There is no `else` arm, so we know both arms have type `()`. // Generate the implicit `else {}` by assigning unit. let correct_si = this.source_info(expr_span.shrink_to_hi()); + this.push_coverage_point_for_implicit_else(false_block, correct_si, expr); this.cfg.push_assign_unit(false_block, correct_si, destination, this.tcx); } diff --git a/compiler/rustc_mir_build/src/builder/expr/stmt.rs b/compiler/rustc_mir_build/src/builder/expr/stmt.rs index 99e16d182a97d..e9b6388152f28 100644 --- a/compiler/rustc_mir_build/src/builder/expr/stmt.rs +++ b/compiler/rustc_mir_build/src/builder/expr/stmt.rs @@ -27,6 +27,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { match expr.kind { ExprKind::Scope { region_scope, hir_id, value } => { this.in_scope((region_scope, source_info), LintLevel::Explicit(hir_id), |this| { + this.push_coverage_point_for_expr(block, source_info, hir_id); this.stmt_expr(block, value, statement_scope) }) } diff --git a/compiler/rustc_mir_build/src/builder/matches/mod.rs b/compiler/rustc_mir_build/src/builder/matches/mod.rs index 528300804c172..a520acda5e6c8 100644 --- a/compiler/rustc_mir_build/src/builder/matches/mod.rs +++ b/compiler/rustc_mir_build/src/builder/matches/mod.rs @@ -155,11 +155,6 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { let local_scope = this.local_scope(); let (true_block, false_block) = this.in_if_then_scope(local_scope, expr_span, |this| { - // Help out coverage instrumentation by injecting a dummy statement with - // the original condition's span (including `!`). This fixes #115468. - if this.tcx.sess.instrument_coverage() { - this.cfg.push_coverage_span_marker(block, this.source_info(expr_span)); - } this.lower_if_condition(block, arg, args.let_not_permitted()) }); // Break if the condition was true; proceed if the condition was false. @@ -167,8 +162,9 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { false_block.unit() } ExprKind::Scope { region_scope, hir_id, value } => { - let region_scope = (region_scope, this.source_info(expr_span)); - this.in_scope(region_scope, LintLevel::Explicit(hir_id), |this| { + let source_info = this.source_info(expr_span); + this.in_scope((region_scope, source_info), LintLevel::Explicit(hir_id), |this| { + this.push_coverage_point_for_expr(block, source_info, hir_id); this.lower_if_condition(block, value, args) }) } diff --git a/compiler/rustc_mir_build/src/builder/mod.rs b/compiler/rustc_mir_build/src/builder/mod.rs index 60b8cf3f78a06..00ef35173b4b9 100644 --- a/compiler/rustc_mir_build/src/builder/mod.rs +++ b/compiler/rustc_mir_build/src/builder/mod.rs @@ -556,6 +556,7 @@ fn construct_fn<'tcx>( }) .into_block(); let source_info = builder.source_info(fn_end); + builder.push_coverage_point_for_fn_end(return_block, source_info, fn_id); builder.cfg.terminate(return_block, source_info, TerminatorKind::Return); builder.build_drop_trees(); return_block.unit() diff --git a/compiler/rustc_mir_build/src/builder/scope.rs b/compiler/rustc_mir_build/src/builder/scope.rs index b7aaa0a52816a..c1e028357359f 100644 --- a/compiler/rustc_mir_build/src/builder/scope.rs +++ b/compiler/rustc_mir_build/src/builder/scope.rs @@ -792,15 +792,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { (None, Some(_)) => { panic!("`return`, `become` and `break` with value and must have a destination") } - (None, None) => { - if self.tcx.sess.instrument_coverage() { - // Normally we wouldn't build any MIR in this case, but that makes it - // harder for coverage instrumentation to extract a relevant span for - // `continue` expressions. So here we inject a dummy statement with the - // desired span. - self.cfg.push_coverage_span_marker(block, source_info); - } - } + (None, None) => {} } let region_scope = self.scopes.breakable_scopes[break_index].region_scope; diff --git a/compiler/rustc_mir_build/src/thir/cx/expr.rs b/compiler/rustc_mir_build/src/thir/cx/expr.rs index e7789e71af34c..edfa6d4e46233 100644 --- a/compiler/rustc_mir_build/src/thir/cx/expr.rs +++ b/compiler/rustc_mir_build/src/thir/cx/expr.rs @@ -134,6 +134,9 @@ impl<'tcx> ThirBuildCx<'tcx> { } // Finally, wrap this up in the expr's scope. + // + // (In addition to marking scope, coverage instrumentation also uses this node + // to help mark the point in MIR where an expression is about to be evaluated.) expr = Expr { temp_scope_id: expr_scope.local_id, ty, diff --git a/compiler/rustc_mir_transform/src/cleanup_post_borrowck.rs b/compiler/rustc_mir_transform/src/cleanup_post_borrowck.rs index a27d98c3e31f5..31d9d124ab846 100644 --- a/compiler/rustc_mir_transform/src/cleanup_post_borrowck.rs +++ b/compiler/rustc_mir_transform/src/cleanup_post_borrowck.rs @@ -5,7 +5,7 @@ //! - [`AscribeUserType`] //! - [`FakeRead`] //! - [`Assign`] statements with a [`Fake`] borrow -//! - [`Coverage`] statements of kind [`BlockMarker`] or [`SpanMarker`] +//! - [`Coverage`] statements that are not needed after the [`InstrumentCoverage`] pass //! //! [`AscribeUserType`]: rustc_middle::mir::StatementKind::AscribeUserType //! [`Assign`]: rustc_middle::mir::StatementKind::Assign @@ -13,10 +13,8 @@ //! [`Nop`]: rustc_middle::mir::StatementKind::Nop //! [`Fake`]: rustc_middle::mir::BorrowKind::Fake //! [`Coverage`]: rustc_middle::mir::StatementKind::Coverage -//! [`BlockMarker`]: rustc_middle::mir::coverage::CoverageKind::BlockMarker -//! [`SpanMarker`]: rustc_middle::mir::coverage::CoverageKind::SpanMarker +//! [`InstrumentCoverage`]: crate::coverage::InstrumentCoverage -use rustc_middle::mir::coverage::CoverageKind; use rustc_middle::mir::*; use rustc_middle::ty::TyCtxt; use rustc_middle::ty::adjustment::PointerCoercion; @@ -34,15 +32,13 @@ impl<'tcx> crate::MirPass<'tcx> for CleanupPostBorrowck { match statement.kind { StatementKind::AscribeUserType(..) | StatementKind::Assign((_, Rvalue::Ref(_, BorrowKind::Fake(_), _))) - | StatementKind::Coverage( - // These kinds of coverage statements are markers inserted during - // MIR building, and are not needed after InstrumentCoverage. - CoverageKind::BlockMarker { .. } | CoverageKind::SpanMarker { .. }, - ) | StatementKind::FakeRead(..) | StatementKind::BackwardIncompatibleDropHint { .. } => { statement.make_nop(true) } + StatementKind::Coverage(ref kind) if kind.is_removed_after_analysis() => { + statement.make_nop(true) + } StatementKind::Assign(( _, Rvalue::Cast( diff --git a/compiler/rustc_mir_transform/src/coverage/expansion.rs b/compiler/rustc_mir_transform/src/coverage/expansion.rs index b1122d9618fc7..5e8d261ae1f41 100644 --- a/compiler/rustc_mir_transform/src/coverage/expansion.rs +++ b/compiler/rustc_mir_transform/src/coverage/expansion.rs @@ -103,7 +103,7 @@ pub(crate) fn build_expn_tree( hir_info: &ExtractedHirInfo, graph: &CoverageGraph, ) -> Result { - let raw_spans = from_mir::extract_raw_spans_from_mir(mir_body, graph); + let raw_spans = from_mir::extract_raw_spans_from_mir(mir_body, hir_info, graph); let mut nodes = FxIndexMap::default(); let new_node = |&context: &SyntaxContext| ExpnNode::for_context(context); diff --git a/compiler/rustc_mir_transform/src/coverage/from_mir.rs b/compiler/rustc_mir_transform/src/coverage/from_mir.rs index 29f9d200b1bcb..cff81d02f7837 100644 --- a/compiler/rustc_mir_transform/src/coverage/from_mir.rs +++ b/compiler/rustc_mir_transform/src/coverage/from_mir.rs @@ -1,51 +1,42 @@ -use std::iter; - -use rustc_middle::bug; -use rustc_middle::mir::coverage::CoverageKind; -use rustc_middle::mir::{ - self, FakeReadCause, Statement, StatementKind, Terminator, TerminatorKind, -}; +use rustc_middle::mir::coverage::{CoverageKind, PointKind}; +use rustc_middle::mir::{self, Statement, StatementKind}; use rustc_span::Span; use crate::coverage::graph::{BasicCoverageBlock, CoverageGraph}; +use crate::coverage::hir_info::ExtractedHirInfo; #[derive(Debug)] pub(crate) struct RawSpanFromMir { - /// A span that has been extracted from a MIR statement/terminator, but + /// A span that has been extracted from a MIR marker statement, but /// hasn't been "unexpanded", so it might not lie within the function body /// span and might be part of an expansion with a different context. pub(crate) raw_span: Span, pub(crate) bcb: BasicCoverageBlock, } -/// Generates an initial set of coverage spans from the statements and -/// terminators in the function's MIR body, each associated with its -/// corresponding node in the coverage graph. +/// Generates an initial set of coverage spans from marker statements in the function's +/// MIR body, each associated with its corresponding node in the coverage graph. /// -/// This is necessarily an inexact process, because MIR isn't designed to -/// capture source spans at the level of detail we would want for coverage, -/// but it's good enough to be better than nothing. +/// FIXME(Zalathar): This extraction is currently in a transitional state, since we're +/// no longer trying to heuristically recover meaningful spans from MIR soup, but we +/// haven't yet fully embraced the possibilities of HIR-aware analysis. pub(crate) fn extract_raw_spans_from_mir<'tcx>( mir_body: &mir::Body<'tcx>, + hir_info: &ExtractedHirInfo, graph: &CoverageGraph, ) -> Vec { let mut raw_spans = vec![]; // We only care about blocks that are part of the coverage graph. for (bcb, bcb_data) in graph.iter_enumerated() { - let make_raw_span = |raw_span: Span| RawSpanFromMir { raw_span, bcb }; - // A coverage graph node can consist of multiple basic blocks. for &bb in &bcb_data.basic_blocks { - let bb_data = &mir_body[bb]; - - let statements = bb_data.statements.iter(); - raw_spans.extend(statements.filter_map(filtered_statement_span).map(make_raw_span)); - - // There's only one terminator, but wrap it in an iterator to - // mirror the handling of statements. - let terminator = iter::once(bb_data.terminator()); - raw_spans.extend(terminator.filter_map(filtered_terminator_span).map(make_raw_span)); + let statements = mir_body[bb].statements.iter(); + raw_spans.extend( + statements + .filter_map(|stmt| filtered_statement_span(hir_info, stmt)) + .map(|raw_span: Span| RawSpanFromMir { raw_span, bcb }), + ); } } @@ -54,90 +45,21 @@ pub(crate) fn extract_raw_spans_from_mir<'tcx>( /// If the MIR `Statement` has a span contributive to computing coverage spans, /// return it; otherwise return `None`. -fn filtered_statement_span(statement: &Statement<'_>) -> Option { - match statement.kind { - // These statements have spans that are often outside the scope of the executed source code - // for their parent `BasicBlock`. - StatementKind::StorageLive(_) - | StatementKind::StorageDead(_) - | StatementKind::ConstEvalCounter - | StatementKind::BackwardIncompatibleDropHint { .. } - | StatementKind::Nop => None, - - // FIXME(#78546): MIR InstrumentCoverage - Can the source_info.span for `FakeRead` - // statements be more consistent? - // - // FakeReadCause::ForGuardBinding, in this example: - // match somenum { - // x if x < 1 => { ... } - // }... - // The BasicBlock within the match arm code included one of these statements, but the span - // for it covered the `1` in this source. The actual statements have nothing to do with that - // source span: - // FakeRead(ForGuardBinding, _4); - // where `_4` is: - // _4 = &_1; (at the span for the first `x`) - // and `_1` is the `Place` for `somenum`. - // - // If and when the Issue is resolved, remove this special case match pattern: - StatementKind::FakeRead((FakeReadCause::ForGuardBinding, _)) => None, - - // Retain spans from most other statements. - StatementKind::FakeRead(_) - | StatementKind::Intrinsic(..) - | StatementKind::Coverage( - // The purpose of `SpanMarker` is to be matched and accepted here. - CoverageKind::SpanMarker, - ) - | StatementKind::Assign(_) - | StatementKind::SetDiscriminant { .. } - | StatementKind::PlaceMention(..) - | StatementKind::AscribeUserType(_, _) => Some(statement.source_info.span), - - // Block markers are used for branch coverage, so ignore them here. - StatementKind::Coverage(CoverageKind::BlockMarker { .. }) => None, - - // These coverage statements should not exist prior to coverage instrumentation. - StatementKind::Coverage(CoverageKind::VirtualCounter { .. }) => bug!( - "Unexpected coverage statement found during coverage instrumentation: {statement:?}" - ), +fn filtered_statement_span<'tcx>( + hir_info: &ExtractedHirInfo, + statement: &Statement<'tcx>, +) -> Option { + let StatementKind::Coverage(CoverageKind::Point { point_kind, hir_id }) = statement.kind else { + return None; + }; + match point_kind { + // These PointKind variants contribute to normal code spans. + // (Other variants added in the future might want to return None here.) + PointKind::Expr | PointKind::ImplicitElse | PointKind::FunctionEnd => {} } -} - -/// If the MIR `Terminator` has a span contributive to computing coverage spans, -/// return it; otherwise return `None`. -fn filtered_terminator_span(terminator: &Terminator<'_>) -> Option { - match terminator.kind { - // These terminators have spans that don't positively contribute to computing a reasonable - // span of actually executed source code. (For example, SwitchInt terminators extracted from - // an `if condition { block }` has a span that includes the executed block, if true, - // but for coverage, the code region executed, up to *and* through the SwitchInt, - // actually stops before the if's block.) - TerminatorKind::Unreachable - | TerminatorKind::Assert { .. } - | TerminatorKind::Drop { .. } - | TerminatorKind::SwitchInt { .. } - | TerminatorKind::FalseEdge { .. } - | TerminatorKind::Goto { .. } => None, - - // Call `func` operand can have a more specific span when part of a chain of calls - TerminatorKind::Call { ref func, .. } | TerminatorKind::TailCall { ref func, .. } => { - let mut span = terminator.source_info.span; - if let mir::Operand::Constant(constant) = func - && span.contains(constant.span) - { - span = constant.span; - } - Some(span) - } - - // Retain spans from all other terminators - TerminatorKind::UnwindResume - | TerminatorKind::UnwindTerminate(_) - | TerminatorKind::Return - | TerminatorKind::Yield { .. } - | TerminatorKind::CoroutineDrop - | TerminatorKind::FalseUnwind { .. } - | TerminatorKind::InlineAsm { .. } => Some(terminator.source_info.span), + if hir_info.nodes_to_ignore.contains(&hir_id) { + return None; } + + Some(statement.source_info.span) } diff --git a/compiler/rustc_mir_transform/src/coverage/hir_info.rs b/compiler/rustc_mir_transform/src/coverage/hir_info.rs index 246104ee97843..d863aa4c4b80e 100644 --- a/compiler/rustc_mir_transform/src/coverage/hir_info.rs +++ b/compiler/rustc_mir_transform/src/coverage/hir_info.rs @@ -1,10 +1,11 @@ -use rustc_hir as hir; -use rustc_hir::intravisit::{Visitor, walk_expr}; +use rustc_data_structures::fx::FxHashSet; +use rustc_hir::intravisit::Visitor; +use rustc_hir::{self as hir, HirId}; use rustc_middle::hir::nested_filter; use rustc_middle::mir; -use rustc_middle::ty::{self, TyCtxt}; -use rustc_span::Span; +use rustc_middle::ty::{self, TyCtxt, TypeckResults}; use rustc_span::def_id::LocalDefId; +use rustc_span::{ExpnKind, MacroKind, Span}; /// Function information extracted from HIR by the coverage instrumentor. #[derive(Debug)] @@ -19,6 +20,9 @@ pub(crate) struct ExtractedHirInfo { /// should not be included in coverage spans for this function /// (e.g. closures and nested items). pub(crate) hole_spans: Vec, + /// HIR nodes that should be ignored when extracting spans from marker + /// statements in MIR. + pub(crate) nodes_to_ignore: FxHashSet, } pub(crate) fn extract_hir_info<'tcx>( @@ -74,8 +78,16 @@ pub(crate) fn extract_hir_info<'tcx>( let function_source_hash = hash_mir_source(tcx, hir_body); let hole_spans = extract_hole_spans_from_hir(tcx, hir_body); - - ExtractedHirInfo { function_source_hash, is_async_fn, fn_sig_span, body_span, hole_spans } + let nodes_to_ignore = find_nodes_to_ignore(tcx, def_id, hir_body); + + ExtractedHirInfo { + function_source_hash, + is_async_fn, + fn_sig_span, + body_span, + hole_spans, + nodes_to_ignore, + } } fn hash_mir_source<'tcx>(tcx: TyCtxt<'tcx>, hir_body: &'tcx hir::Body<'tcx>) -> u64 { @@ -123,7 +135,7 @@ fn extract_hole_spans_from_hir<'tcx>(tcx: TyCtxt<'tcx>, hir_body: &hir::Body<'tc } // For other expressions, recursively visit as normal. - _ => walk_expr(self, expr), + _ => hir::intravisit::walk_expr(self, expr), } } } @@ -138,3 +150,70 @@ fn extract_hole_spans_from_hir<'tcx>(tcx: TyCtxt<'tcx>, hir_body: &hir::Body<'tc visitor.visit_body(hir_body); visitor.hole_spans } + +/// Use heuristics to detect HIR expression nodes that should be ignored during +/// spans-from-MIR extraction. +fn find_nodes_to_ignore<'tcx>( + tcx: TyCtxt<'tcx>, + def_id: LocalDefId, + hir_body: &hir::Body<'tcx>, +) -> FxHashSet { + /// Top-level visitor used by [`find_nodes_to_ignore`]. + struct FindNodesToIgnoreVisitor<'tcx> { + tcx: TyCtxt<'tcx>, + typeck_results: &'tcx TypeckResults<'tcx>, + nodes_to_ignore: FxHashSet, + } + /// Marks all expressions in a HIR subtree as ignored. + struct IgnoreAllSubexprsVisitor<'a, 'tcx> { + inner: &'a mut FindNodesToIgnoreVisitor<'tcx>, + } + + impl<'tcx> Visitor<'tcx> for FindNodesToIgnoreVisitor<'tcx> { + fn visit_expr(&mut self, expr: &'tcx hir::Expr<'tcx>) { + // Look for call expressions with a return type of `!` produced by a bang-macro. + // If we find one, ignore all subexpressions in the call's _arguments_. + // This avoids big regressions in coverage-report quality for code with assertions. + // + // FIXME(Zalathar): We might be able to remove this by extending `#[coverage(off)]` + // to support expressions, and using it the standard-library assert macros. + if let hir::ExprKind::Call(callee, args) = expr.kind + && let callee_ty = self.typeck_results.node_type(callee.hir_id) + && callee_ty.is_fn() + && let Some(output) = callee_ty.fn_sig(self.tcx).output().no_bound_vars() + && output.is_never() + && let ExpnKind::Macro(MacroKind::Bang, _) = expr.span.ctxt().outer_expn_data().kind + { + for arg in args { + (IgnoreAllSubexprsVisitor { inner: self }).visit_expr(arg) + } + } + + // Find and ignore block-expressions that are non-empty, as their subexpressions + // will produce more precise coverage spans. + if let hir::ExprKind::Block(block, _) = expr.kind + && let is_empty = (block.stmts.is_empty() && block.expr.is_none()) + && !is_empty + { + // Ignore the block itself, but not its subexpressions. + self.nodes_to_ignore.insert(expr.hir_id); + } + + hir::intravisit::walk_expr(self, expr); + } + } + impl<'tcx> Visitor<'tcx> for IgnoreAllSubexprsVisitor<'_, 'tcx> { + fn visit_expr(&mut self, expr: &'tcx hir::Expr<'tcx>) { + self.inner.nodes_to_ignore.insert(expr.hir_id); + hir::intravisit::walk_expr(self, expr); + } + } + + let mut visitor = FindNodesToIgnoreVisitor { + tcx, + typeck_results: tcx.typeck(def_id), + nodes_to_ignore: FxHashSet::default(), + }; + visitor.visit_body(hir_body); + visitor.nodes_to_ignore +} diff --git a/compiler/rustc_mir_transform/src/validate.rs b/compiler/rustc_mir_transform/src/validate.rs index 65c6adc5430e4..4bb497097c1de 100644 --- a/compiler/rustc_mir_transform/src/validate.rs +++ b/compiler/rustc_mir_transform/src/validate.rs @@ -8,7 +8,6 @@ use rustc_index::IndexVec; use rustc_index::bit_set::DenseBitSet; use rustc_infer::infer::TyCtxtInferExt; use rustc_infer::traits::{Obligation, ObligationCause}; -use rustc_middle::mir::coverage::CoverageKind; use rustc_middle::mir::visit::{MutatingUseContext, NonUseContext, PlaceContext, Visitor}; use rustc_middle::mir::*; use rustc_middle::ty::adjustment::PointerCoercion; @@ -317,7 +316,7 @@ impl<'a, 'tcx> Visitor<'tcx> for CfgChecker<'a, 'tcx> { } StatementKind::Coverage(kind) => { if self.body.phase >= MirPhase::Analysis(AnalysisPhase::PostCleanup) - && let CoverageKind::BlockMarker { .. } | CoverageKind::SpanMarker { .. } = kind + && kind.is_removed_after_analysis() { self.fail( location, diff --git a/tests/coverage-run-rustdoc/doctest.coverage b/tests/coverage-run-rustdoc/doctest.coverage index 0fa94361c472e..84d85db155616 100644 --- a/tests/coverage-run-rustdoc/doctest.coverage +++ b/tests/coverage-run-rustdoc/doctest.coverage @@ -44,12 +44,10 @@ $DIR/doctest.rs: LL| |//! } else { LL| 1|//! if *res.as_ref().unwrap_err() == *res.as_ref().unwrap_err() { LL| 1|//! println!("{:?}", res); - LL| 1|//! } - ^0 + LL| 0|//! } LL| 1|//! if *res.as_ref().unwrap_err() == *res.as_ref().unwrap_err() { LL| 1|//! res = Ok(1); - LL| 1|//! } - ^0 + LL| 0|//! } LL| 1|//! res = Ok(0); LL| |//! } LL| |//! // need to be explicit because rustdoc cant infer the return type diff --git a/tests/coverage/assert-ne.cov-map b/tests/coverage/assert-ne.cov-map index fde0d5184d675..3418db8e84cc6 100644 --- a/tests/coverage/assert-ne.cov-map +++ b/tests/coverage/assert-ne.cov-map @@ -1,17 +1,16 @@ Function name: assert_ne::main -Raw bytes (55): 0x[01, 01, 03, 01, 05, 01, 09, 01, 09, 09, 01, 08, 01, 00, 0a, 01, 01, 05, 00, 0f, 01, 01, 09, 00, 12, 01, 00, 13, 00, 19, 01, 01, 0c, 00, 15, 05, 01, 0d, 00, 13, 02, 02, 0d, 00, 13, 0a, 03, 05, 00, 07, 0a, 01, 01, 00, 02] +Raw bytes (50): 0x[01, 01, 03, 01, 05, 01, 09, 01, 09, 08, 01, 08, 01, 00, 0a, 01, 01, 05, 00, 0f, 01, 01, 09, 00, 1a, 01, 01, 0c, 00, 1c, 05, 01, 0d, 00, 13, 02, 02, 0d, 00, 13, 0a, 03, 05, 00, 07, 0a, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/assert-ne.rs Number of expressions: 3 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) - expression 1 operands: lhs = Counter(0), rhs = Counter(2) - expression 2 operands: lhs = Counter(0), rhs = Counter(2) -Number of file 0 mappings: 9 +Number of file 0 mappings: 8 - Code(Counter(0)) at (prev + 8, 1) to (start + 0, 10) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 18) -- Code(Counter(0)) at (prev + 0, 19) to (start + 0, 25) -- Code(Counter(0)) at (prev + 1, 12) to (start + 0, 21) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 26) +- Code(Counter(0)) at (prev + 1, 12) to (start + 0, 28) - Code(Counter(1)) at (prev + 1, 13) to (start + 0, 19) - Code(Expression(0, Sub)) at (prev + 2, 13) to (start + 0, 19) = (c0 - c1) diff --git a/tests/coverage/assert.cov-map b/tests/coverage/assert.cov-map index 4500eab355739..c0d166c394ff3 100644 --- a/tests/coverage/assert.cov-map +++ b/tests/coverage/assert.cov-map @@ -1,72 +1,80 @@ Function name: assert::assert_a_plain -Raw bytes (54): 0x[01, 01, 00, 0a, 01, 06, 01, 00, 25, 01, 01, 05, 00, 0c, 01, 00, 0d, 00, 10, 01, 00, 11, 00, 18, 05, 01, 05, 00, 0f, 09, 01, 05, 00, 0f, 15, 01, 05, 00, 14, 0d, 00, 15, 00, 18, 11, 00, 1f, 00, 25, 15, 01, 01, 00, 02] +Raw bytes (64): 0x[01, 01, 00, 0c, 01, 06, 01, 00, 25, 01, 01, 05, 00, 0c, 01, 00, 0d, 00, 1a, 05, 01, 05, 00, 0f, 05, 00, 10, 00, 13, 05, 00, 15, 00, 21, 09, 01, 05, 00, 0f, 09, 00, 10, 00, 13, 09, 00, 15, 00, 19, 0d, 01, 05, 00, 14, 0d, 00, 15, 00, 18, 11, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/assert.rs Number of expressions: 0 -Number of file 0 mappings: 10 +Number of file 0 mappings: 12 - Code(Counter(0)) at (prev + 6, 1) to (start + 0, 37) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 12) -- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 24) +- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 26) - Code(Counter(1)) at (prev + 1, 5) to (start + 0, 15) +- Code(Counter(1)) at (prev + 0, 16) to (start + 0, 19) +- Code(Counter(1)) at (prev + 0, 21) to (start + 0, 33) - Code(Counter(2)) at (prev + 1, 5) to (start + 0, 15) -- Code(Counter(5)) at (prev + 1, 5) to (start + 0, 20) +- Code(Counter(2)) at (prev + 0, 16) to (start + 0, 19) +- Code(Counter(2)) at (prev + 0, 21) to (start + 0, 25) +- Code(Counter(3)) at (prev + 1, 5) to (start + 0, 20) - Code(Counter(3)) at (prev + 0, 21) to (start + 0, 24) -- Code(Counter(4)) at (prev + 0, 31) to (start + 0, 37) -- Code(Counter(5)) at (prev + 1, 1) to (start + 0, 2) -Highest counter ID seen: c5 +- Code(Counter(4)) at (prev + 1, 1) to (start + 0, 2) +Highest counter ID seen: c4 Function name: assert::assert_b_message -Raw bytes (54): 0x[01, 01, 00, 0a, 01, 0d, 01, 00, 27, 01, 01, 05, 00, 0c, 01, 00, 0d, 00, 10, 01, 00, 11, 00, 18, 05, 01, 05, 00, 0f, 09, 01, 05, 00, 0f, 15, 01, 05, 00, 14, 0d, 00, 15, 00, 18, 11, 00, 1f, 00, 25, 15, 01, 01, 00, 02] +Raw bytes (64): 0x[01, 01, 00, 0c, 01, 0d, 01, 00, 27, 01, 01, 05, 00, 0c, 01, 00, 0d, 00, 1a, 05, 01, 05, 00, 0f, 05, 00, 10, 00, 13, 05, 00, 15, 00, 21, 09, 01, 05, 00, 0f, 09, 00, 10, 00, 13, 09, 00, 15, 00, 19, 0d, 01, 05, 00, 14, 0d, 00, 15, 00, 18, 11, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/assert.rs Number of expressions: 0 -Number of file 0 mappings: 10 +Number of file 0 mappings: 12 - Code(Counter(0)) at (prev + 13, 1) to (start + 0, 39) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 12) -- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 24) +- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 26) - Code(Counter(1)) at (prev + 1, 5) to (start + 0, 15) +- Code(Counter(1)) at (prev + 0, 16) to (start + 0, 19) +- Code(Counter(1)) at (prev + 0, 21) to (start + 0, 33) - Code(Counter(2)) at (prev + 1, 5) to (start + 0, 15) -- Code(Counter(5)) at (prev + 1, 5) to (start + 0, 20) +- Code(Counter(2)) at (prev + 0, 16) to (start + 0, 19) +- Code(Counter(2)) at (prev + 0, 21) to (start + 0, 25) +- Code(Counter(3)) at (prev + 1, 5) to (start + 0, 20) - Code(Counter(3)) at (prev + 0, 21) to (start + 0, 24) -- Code(Counter(4)) at (prev + 0, 31) to (start + 0, 37) -- Code(Counter(5)) at (prev + 1, 1) to (start + 0, 2) -Highest counter ID seen: c5 +- Code(Counter(4)) at (prev + 1, 1) to (start + 0, 2) +Highest counter ID seen: c4 Function name: assert::assert_c_format_inline -Raw bytes (54): 0x[01, 01, 00, 0a, 01, 14, 01, 00, 38, 01, 01, 05, 00, 0c, 01, 00, 0d, 00, 10, 01, 00, 11, 00, 18, 05, 01, 05, 00, 0f, 09, 01, 05, 00, 0f, 15, 01, 05, 00, 14, 0d, 00, 15, 00, 18, 11, 00, 1f, 00, 25, 15, 01, 01, 00, 02] +Raw bytes (64): 0x[01, 01, 00, 0c, 01, 14, 01, 00, 38, 01, 01, 05, 00, 0c, 01, 00, 0d, 00, 1a, 05, 01, 05, 00, 0f, 05, 00, 10, 00, 13, 05, 00, 15, 00, 21, 09, 01, 05, 00, 0f, 09, 00, 10, 00, 13, 09, 00, 15, 00, 19, 0d, 01, 05, 00, 14, 0d, 00, 15, 00, 18, 11, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/assert.rs Number of expressions: 0 -Number of file 0 mappings: 10 +Number of file 0 mappings: 12 - Code(Counter(0)) at (prev + 20, 1) to (start + 0, 56) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 12) -- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 24) +- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 26) - Code(Counter(1)) at (prev + 1, 5) to (start + 0, 15) +- Code(Counter(1)) at (prev + 0, 16) to (start + 0, 19) +- Code(Counter(1)) at (prev + 0, 21) to (start + 0, 33) - Code(Counter(2)) at (prev + 1, 5) to (start + 0, 15) -- Code(Counter(5)) at (prev + 1, 5) to (start + 0, 20) +- Code(Counter(2)) at (prev + 0, 16) to (start + 0, 19) +- Code(Counter(2)) at (prev + 0, 21) to (start + 0, 25) +- Code(Counter(3)) at (prev + 1, 5) to (start + 0, 20) - Code(Counter(3)) at (prev + 0, 21) to (start + 0, 24) -- Code(Counter(4)) at (prev + 0, 31) to (start + 0, 37) -- Code(Counter(5)) at (prev + 1, 1) to (start + 0, 2) -Highest counter ID seen: c5 +- Code(Counter(4)) at (prev + 1, 1) to (start + 0, 2) +Highest counter ID seen: c4 Function name: assert::assert_d_format_arg -Raw bytes (54): 0x[01, 01, 00, 0a, 01, 1b, 01, 00, 35, 01, 01, 05, 00, 0c, 01, 00, 0d, 00, 10, 01, 00, 11, 00, 18, 05, 01, 05, 00, 0f, 09, 01, 05, 00, 0f, 15, 01, 05, 00, 14, 0d, 00, 15, 00, 18, 11, 00, 1f, 00, 25, 15, 01, 01, 00, 02] +Raw bytes (64): 0x[01, 01, 00, 0c, 01, 1b, 01, 00, 35, 01, 01, 05, 00, 0c, 01, 00, 0d, 00, 1a, 05, 01, 05, 00, 0f, 05, 00, 10, 00, 13, 05, 00, 15, 00, 21, 09, 01, 05, 00, 0f, 09, 00, 10, 00, 13, 09, 00, 15, 00, 19, 0d, 01, 05, 00, 14, 0d, 00, 15, 00, 18, 11, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/assert.rs Number of expressions: 0 -Number of file 0 mappings: 10 +Number of file 0 mappings: 12 - Code(Counter(0)) at (prev + 27, 1) to (start + 0, 53) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 12) -- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 24) +- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 26) - Code(Counter(1)) at (prev + 1, 5) to (start + 0, 15) +- Code(Counter(1)) at (prev + 0, 16) to (start + 0, 19) +- Code(Counter(1)) at (prev + 0, 21) to (start + 0, 33) - Code(Counter(2)) at (prev + 1, 5) to (start + 0, 15) -- Code(Counter(5)) at (prev + 1, 5) to (start + 0, 20) +- Code(Counter(2)) at (prev + 0, 16) to (start + 0, 19) +- Code(Counter(2)) at (prev + 0, 21) to (start + 0, 25) +- Code(Counter(3)) at (prev + 1, 5) to (start + 0, 20) - Code(Counter(3)) at (prev + 0, 21) to (start + 0, 24) -- Code(Counter(4)) at (prev + 0, 31) to (start + 0, 37) -- Code(Counter(5)) at (prev + 1, 1) to (start + 0, 2) -Highest counter ID seen: c5 +- Code(Counter(4)) at (prev + 1, 1) to (start + 0, 2) +Highest counter ID seen: c4 diff --git a/tests/coverage/async/async.cov-map b/tests/coverage/async/async.cov-map index b4304a43d64e6..19d206428d007 100644 --- a/tests/coverage/async/async.cov-map +++ b/tests/coverage/async/async.cov-map @@ -112,19 +112,19 @@ Number of file 0 mappings: 1 Highest counter ID seen: c0 Function name: async::g::{closure#0} (unused) -Raw bytes (64): 0x[01, 01, 00, 0c, 00, 1b, 13, 00, 14, 00, 01, 0b, 00, 0c, 00, 01, 09, 00, 0a, 00, 00, 0e, 00, 17, 00, 00, 1b, 00, 1c, 00, 00, 20, 00, 22, 00, 01, 09, 00, 0a, 00, 00, 0e, 00, 17, 00, 00, 1b, 00, 1c, 00, 00, 20, 00, 22, 00, 01, 0e, 00, 10, 00, 02, 01, 00, 02] +Raw bytes (64): 0x[01, 01, 00, 0c, 00, 1b, 13, 00, 14, 00, 01, 0b, 00, 0c, 00, 01, 0e, 00, 11, 00, 00, 12, 00, 17, 00, 00, 1b, 00, 1c, 00, 00, 20, 00, 22, 00, 01, 0e, 00, 11, 00, 00, 12, 00, 17, 00, 00, 1b, 00, 1c, 00, 00, 20, 00, 22, 00, 01, 0e, 00, 10, 00, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/async.rs Number of expressions: 0 Number of file 0 mappings: 12 - Code(Zero) at (prev + 27, 19) to (start + 0, 20) - Code(Zero) at (prev + 1, 11) to (start + 0, 12) -- Code(Zero) at (prev + 1, 9) to (start + 0, 10) -- Code(Zero) at (prev + 0, 14) to (start + 0, 23) +- Code(Zero) at (prev + 1, 14) to (start + 0, 17) +- Code(Zero) at (prev + 0, 18) to (start + 0, 23) - Code(Zero) at (prev + 0, 27) to (start + 0, 28) - Code(Zero) at (prev + 0, 32) to (start + 0, 34) -- Code(Zero) at (prev + 1, 9) to (start + 0, 10) -- Code(Zero) at (prev + 0, 14) to (start + 0, 23) +- Code(Zero) at (prev + 1, 14) to (start + 0, 17) +- Code(Zero) at (prev + 0, 18) to (start + 0, 23) - Code(Zero) at (prev + 0, 27) to (start + 0, 28) - Code(Zero) at (prev + 0, 32) to (start + 0, 34) - Code(Zero) at (prev + 1, 14) to (start + 0, 16) @@ -141,15 +141,15 @@ Number of file 0 mappings: 1 Highest counter ID seen: c0 Function name: async::h::{closure#0} (unused) -Raw bytes (44): 0x[01, 01, 00, 08, 00, 23, 16, 00, 17, 00, 03, 0b, 00, 0c, 00, 01, 09, 00, 0a, 00, 00, 0e, 00, 19, 00, 00, 1a, 00, 1b, 00, 00, 20, 00, 22, 00, 01, 0e, 00, 10, 00, 02, 01, 00, 02] +Raw bytes (44): 0x[01, 01, 00, 08, 00, 23, 16, 00, 17, 00, 03, 0b, 00, 0c, 00, 01, 0e, 00, 13, 00, 00, 14, 00, 19, 00, 00, 1a, 00, 1b, 00, 00, 20, 00, 22, 00, 01, 0e, 00, 10, 00, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/async.rs Number of expressions: 0 Number of file 0 mappings: 8 - Code(Zero) at (prev + 35, 22) to (start + 0, 23) - Code(Zero) at (prev + 3, 11) to (start + 0, 12) -- Code(Zero) at (prev + 1, 9) to (start + 0, 10) -- Code(Zero) at (prev + 0, 14) to (start + 0, 25) +- Code(Zero) at (prev + 1, 14) to (start + 0, 19) +- Code(Zero) at (prev + 0, 20) to (start + 0, 25) - Code(Zero) at (prev + 0, 26) to (start + 0, 27) - Code(Zero) at (prev + 0, 32) to (start + 0, 34) - Code(Zero) at (prev + 1, 14) to (start + 0, 16) @@ -166,7 +166,7 @@ Number of file 0 mappings: 1 Highest counter ID seen: c0 Function name: async::i::{closure#0} -Raw bytes (75): 0x[01, 01, 03, 05, 09, 11, 15, 0d, 11, 0d, 01, 2c, 13, 00, 14, 01, 04, 0b, 00, 0c, 09, 01, 09, 00, 0a, 01, 00, 0e, 00, 18, 01, 00, 0e, 00, 0f, 05, 00, 1c, 00, 21, 09, 00, 27, 00, 30, 15, 01, 09, 00, 0a, 02, 00, 0e, 00, 17, 11, 00, 1b, 00, 20, 15, 00, 24, 00, 26, 06, 01, 0e, 00, 10, 0b, 02, 01, 00, 02] +Raw bytes (75): 0x[01, 01, 03, 05, 09, 11, 15, 0d, 11, 0d, 01, 2c, 13, 00, 14, 01, 04, 0b, 00, 0c, 01, 01, 0e, 00, 12, 01, 00, 13, 00, 18, 05, 00, 1c, 00, 21, 09, 00, 27, 00, 2a, 09, 00, 2b, 00, 30, 02, 01, 0e, 00, 11, 02, 00, 12, 00, 17, 11, 00, 1b, 00, 20, 15, 00, 24, 00, 26, 06, 01, 0e, 00, 10, 0b, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/async.rs Number of expressions: 3 @@ -176,13 +176,14 @@ Number of expressions: 3 Number of file 0 mappings: 13 - Code(Counter(0)) at (prev + 44, 19) to (start + 0, 20) - Code(Counter(0)) at (prev + 4, 11) to (start + 0, 12) -- Code(Counter(2)) at (prev + 1, 9) to (start + 0, 10) -- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 24) -- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 15) +- Code(Counter(0)) at (prev + 1, 14) to (start + 0, 18) +- Code(Counter(0)) at (prev + 0, 19) to (start + 0, 24) - Code(Counter(1)) at (prev + 0, 28) to (start + 0, 33) -- Code(Counter(2)) at (prev + 0, 39) to (start + 0, 48) -- Code(Counter(5)) at (prev + 1, 9) to (start + 0, 10) -- Code(Expression(0, Sub)) at (prev + 0, 14) to (start + 0, 23) +- Code(Counter(2)) at (prev + 0, 39) to (start + 0, 42) +- Code(Counter(2)) at (prev + 0, 43) to (start + 0, 48) +- Code(Expression(0, Sub)) at (prev + 1, 14) to (start + 0, 17) + = (c1 - c2) +- Code(Expression(0, Sub)) at (prev + 0, 18) to (start + 0, 23) = (c1 - c2) - Code(Counter(4)) at (prev + 0, 27) to (start + 0, 32) - Code(Counter(5)) at (prev + 0, 36) to (start + 0, 38) @@ -193,22 +194,22 @@ Number of file 0 mappings: 13 Highest counter ID seen: c5 Function name: async::j -Raw bytes (65): 0x[01, 01, 03, 01, 05, 01, 0b, 05, 09, 0b, 01, 37, 01, 00, 0c, 01, 0b, 0b, 00, 0c, 05, 01, 09, 00, 0a, 01, 00, 0e, 00, 1b, 01, 00, 0e, 00, 0f, 05, 00, 1f, 00, 27, 09, 01, 09, 00, 0a, 02, 00, 0e, 00, 1a, 09, 00, 1e, 00, 20, 06, 01, 0e, 00, 10, 01, 02, 01, 00, 02] +Raw bytes (60): 0x[01, 01, 03, 01, 05, 01, 0b, 05, 09, 0a, 01, 37, 01, 00, 0c, 01, 0b, 0b, 00, 0c, 01, 01, 0e, 00, 1b, 01, 00, 0e, 00, 12, 05, 00, 21, 00, 24, 02, 01, 0e, 00, 1a, 02, 00, 0e, 00, 11, 09, 00, 1e, 00, 20, 06, 01, 0e, 00, 10, 01, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/async.rs Number of expressions: 3 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) - expression 1 operands: lhs = Counter(0), rhs = Expression(2, Add) - expression 2 operands: lhs = Counter(1), rhs = Counter(2) -Number of file 0 mappings: 11 +Number of file 0 mappings: 10 - Code(Counter(0)) at (prev + 55, 1) to (start + 0, 12) - Code(Counter(0)) at (prev + 11, 11) to (start + 0, 12) -- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 10) -- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 27) -- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 15) -- Code(Counter(1)) at (prev + 0, 31) to (start + 0, 39) -- Code(Counter(2)) at (prev + 1, 9) to (start + 0, 10) -- Code(Expression(0, Sub)) at (prev + 0, 14) to (start + 0, 26) +- Code(Counter(0)) at (prev + 1, 14) to (start + 0, 27) +- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 18) +- Code(Counter(1)) at (prev + 0, 33) to (start + 0, 36) +- Code(Expression(0, Sub)) at (prev + 1, 14) to (start + 0, 26) + = (c0 - c1) +- Code(Expression(0, Sub)) at (prev + 0, 14) to (start + 0, 17) = (c0 - c1) - Code(Counter(2)) at (prev + 0, 30) to (start + 0, 32) - Code(Expression(1, Sub)) at (prev + 1, 14) to (start + 0, 16) @@ -305,23 +306,20 @@ Number of file 0 mappings: 3 Highest counter ID seen: (none) Function name: async::main -Raw bytes (69): 0x[01, 01, 00, 0d, 01, 5b, 01, 00, 0a, 01, 01, 0d, 00, 12, 01, 01, 0d, 00, 11, 01, 01, 09, 00, 13, 01, 00, 16, 00, 1e, 01, 00, 1f, 00, 20, 01, 01, 05, 00, 06, 01, 01, 05, 00, 06, 01, 01, 0d, 00, 11, 01, 01, 05, 00, 17, 01, 00, 18, 00, 1e, 01, 00, 1f, 00, 25, 01, 01, 01, 00, 02] +Raw bytes (54): 0x[01, 01, 00, 0a, 01, 5b, 01, 00, 0a, 01, 01, 0d, 00, 12, 01, 01, 0d, 00, 11, 01, 01, 16, 00, 24, 01, 00, 16, 00, 1e, 01, 01, 05, 00, 09, 01, 01, 05, 00, 09, 01, 01, 0d, 00, 11, 01, 01, 05, 00, 28, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/async.rs Number of expressions: 0 -Number of file 0 mappings: 13 +Number of file 0 mappings: 10 - Code(Counter(0)) at (prev + 91, 1) to (start + 0, 10) - Code(Counter(0)) at (prev + 1, 13) to (start + 0, 18) - Code(Counter(0)) at (prev + 1, 13) to (start + 0, 17) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 19) +- Code(Counter(0)) at (prev + 1, 22) to (start + 0, 36) - Code(Counter(0)) at (prev + 0, 22) to (start + 0, 30) -- Code(Counter(0)) at (prev + 0, 31) to (start + 0, 32) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 6) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 6) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 9) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 9) - Code(Counter(0)) at (prev + 1, 13) to (start + 0, 17) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 23) -- Code(Counter(0)) at (prev + 0, 24) to (start + 0, 30) -- Code(Counter(0)) at (prev + 0, 31) to (start + 0, 37) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 40) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/async/async.coverage b/tests/coverage/async/async.coverage index fe1a353b5f1a1..52fef44aa6897 100644 --- a/tests/coverage/async/async.coverage +++ b/tests/coverage/async/async.coverage @@ -49,9 +49,9 @@ LL| | // executed asynchronously. LL| 1| match x { LL| 1| y if c(x).await == y + 1 => { d().await; } - ^0 ^0 + ^0 ^0 LL| 1| y if f().await == y + 1 => (), - ^0 ^0 + ^0 LL| 1| _ => (), LL| | } LL| 1|} @@ -69,9 +69,9 @@ LL| 1| fn f() -> u8 { 1 } LL| 1| match x { LL| 1| y if c(x) == y + 1 => { d(); } - ^0 ^0 + ^0 LL| 1| y if f() == y + 1 => (), - ^0 ^0 + ^0 LL| 1| _ => (), LL| | } LL| 1|} diff --git a/tests/coverage/async/async2.cov-map b/tests/coverage/async/async2.cov-map index 9fb5e8e4ef37e..99c3dfb2b0eff 100644 --- a/tests/coverage/async/async2.cov-map +++ b/tests/coverage/async/async2.cov-map @@ -8,18 +8,19 @@ Number of file 0 mappings: 1 Highest counter ID seen: c0 Function name: async2::async_func::{closure#0} -Raw bytes (44): 0x[01, 01, 00, 08, 01, 0f, 17, 00, 18, 01, 01, 05, 00, 0d, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 11, 01, 01, 08, 00, 09, 01, 00, 0a, 02, 06, 00, 02, 05, 00, 06, 01, 01, 01, 00, 02] +Raw bytes (49): 0x[01, 01, 00, 09, 01, 0f, 17, 00, 18, 01, 01, 05, 00, 0d, 01, 00, 0e, 00, 26, 01, 01, 0d, 00, 11, 01, 01, 08, 00, 09, 01, 01, 09, 00, 11, 01, 00, 12, 00, 2f, 00, 01, 05, 00, 06, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/async2.rs Number of expressions: 0 -Number of file 0 mappings: 8 +Number of file 0 mappings: 9 - Code(Counter(0)) at (prev + 15, 23) to (start + 0, 24) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10) -- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 17) +- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 38) +- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 17) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 9) -- Code(Counter(0)) at (prev + 0, 10) to (start + 2, 6) -- Code(Zero) at (prev + 2, 5) to (start + 0, 6) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 17) +- Code(Counter(0)) at (prev + 0, 18) to (start + 0, 47) +- Code(Zero) at (prev + 1, 5) to (start + 0, 6) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 @@ -33,45 +34,46 @@ Number of file 0 mappings: 1 Highest counter ID seen: c0 Function name: async2::async_func_just_println::{closure#0} -Raw bytes (19): 0x[01, 01, 00, 03, 01, 17, 24, 00, 25, 01, 01, 05, 00, 0d, 01, 01, 01, 00, 02] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 17, 24, 00, 25, 01, 01, 05, 00, 0d, 01, 00, 0e, 00, 33, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/async2.rs Number of expressions: 0 -Number of file 0 mappings: 3 +Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 23, 36) to (start + 0, 37) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 51) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: async2::main -Raw bytes (44): 0x[01, 01, 00, 08, 01, 1b, 01, 00, 0a, 01, 01, 05, 00, 0d, 01, 02, 05, 00, 13, 01, 02, 05, 00, 17, 01, 00, 18, 00, 22, 01, 01, 05, 00, 17, 01, 00, 18, 00, 2f, 01, 01, 01, 00, 02] +Raw bytes (39): 0x[01, 01, 00, 07, 01, 1b, 01, 00, 0a, 01, 01, 05, 00, 0d, 01, 00, 0e, 00, 23, 01, 02, 05, 00, 15, 01, 02, 05, 00, 25, 01, 01, 05, 00, 32, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/async2.rs Number of expressions: 0 -Number of file 0 mappings: 8 +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 27, 1) to (start + 0, 10) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) -- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 19) -- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 23) -- Code(Counter(0)) at (prev + 0, 24) to (start + 0, 34) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 23) -- Code(Counter(0)) at (prev + 0, 24) to (start + 0, 47) +- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 35) +- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 21) +- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 37) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 50) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: async2::non_async_func -Raw bytes (44): 0x[01, 01, 00, 08, 01, 07, 01, 00, 14, 01, 01, 05, 00, 0d, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 11, 01, 01, 08, 00, 09, 01, 00, 0a, 02, 06, 00, 02, 05, 00, 06, 01, 01, 01, 00, 02] +Raw bytes (49): 0x[01, 01, 00, 09, 01, 07, 01, 00, 14, 01, 01, 05, 00, 0d, 01, 00, 0e, 00, 2a, 01, 01, 0d, 00, 11, 01, 01, 08, 00, 09, 01, 01, 09, 00, 11, 01, 00, 12, 00, 33, 00, 01, 05, 00, 06, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/async2.rs Number of expressions: 0 -Number of file 0 mappings: 8 +Number of file 0 mappings: 9 - Code(Counter(0)) at (prev + 7, 1) to (start + 0, 20) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10) -- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 17) +- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 42) +- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 17) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 9) -- Code(Counter(0)) at (prev + 0, 10) to (start + 2, 6) -- Code(Zero) at (prev + 2, 5) to (start + 0, 6) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 17) +- Code(Counter(0)) at (prev + 0, 18) to (start + 0, 51) +- Code(Zero) at (prev + 1, 5) to (start + 0, 6) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/async/async2.coverage b/tests/coverage/async/async2.coverage index e9ed8253093d0..8e71ec6edc90f 100644 --- a/tests/coverage/async/async2.coverage +++ b/tests/coverage/async/async2.coverage @@ -9,8 +9,7 @@ LL| 1| let b = true; LL| 1| if b { LL| 1| println!("non_async_func println in block"); - LL| 1| } - ^0 + LL| 0| } LL| 1|} LL| | LL| 1|async fn async_func() { @@ -18,8 +17,7 @@ LL| 1| let b = true; LL| 1| if b { LL| 1| println!("async_func println in block"); - LL| 1| } - ^0 + LL| 0| } LL| 1|} LL| | LL| 1|async fn async_func_just_println() { diff --git a/tests/coverage/async/async_block.cov-map b/tests/coverage/async/async_block.cov-map index 08f5a7b5d79ee..1c7a0bab8b602 100644 --- a/tests/coverage/async/async_block.cov-map +++ b/tests/coverage/async/async_block.cov-map @@ -1,35 +1,32 @@ Function name: async_block::main -Raw bytes (41): 0x[01, 01, 01, 05, 01, 07, 01, 07, 01, 00, 0a, 02, 01, 09, 00, 0a, 01, 00, 0e, 00, 13, 02, 01, 0d, 00, 13, 02, 07, 09, 00, 1b, 02, 00, 1c, 00, 22, 01, 02, 01, 00, 02] +Raw bytes (26): 0x[01, 01, 01, 05, 01, 04, 01, 07, 01, 00, 0a, 01, 01, 0e, 00, 13, 02, 08, 09, 00, 23, 01, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/async_block.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(1), rhs = Counter(0) -Number of file 0 mappings: 7 +Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 7, 1) to (start + 0, 10) -- Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 10) - = (c1 - c0) -- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 19) -- Code(Expression(0, Sub)) at (prev + 1, 13) to (start + 0, 19) - = (c1 - c0) -- Code(Expression(0, Sub)) at (prev + 7, 9) to (start + 0, 27) - = (c1 - c0) -- Code(Expression(0, Sub)) at (prev + 0, 28) to (start + 0, 34) +- Code(Counter(0)) at (prev + 1, 14) to (start + 0, 19) +- Code(Expression(0, Sub)) at (prev + 8, 9) to (start + 0, 35) = (c1 - c0) - Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: async_block::main::{closure#0} -Raw bytes (31): 0x[01, 01, 01, 01, 05, 05, 01, 09, 1c, 00, 1d, 01, 01, 10, 00, 17, 05, 00, 18, 02, 0e, 02, 02, 14, 02, 0e, 01, 03, 09, 00, 0a] +Raw bytes (41): 0x[01, 01, 01, 01, 05, 07, 01, 09, 1c, 00, 1d, 01, 01, 10, 00, 17, 05, 01, 11, 00, 19, 05, 00, 1a, 00, 1f, 02, 02, 11, 00, 19, 02, 00, 1a, 00, 21, 01, 02, 09, 00, 0a] Number of files: 1 - file 0 => $DIR/async_block.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 5 +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 9, 28) to (start + 0, 29) - Code(Counter(0)) at (prev + 1, 16) to (start + 0, 23) -- Code(Counter(1)) at (prev + 0, 24) to (start + 2, 14) -- Code(Expression(0, Sub)) at (prev + 2, 20) to (start + 2, 14) +- Code(Counter(1)) at (prev + 1, 17) to (start + 0, 25) +- Code(Counter(1)) at (prev + 0, 26) to (start + 0, 31) +- Code(Expression(0, Sub)) at (prev + 2, 17) to (start + 0, 25) + = (c0 - c1) +- Code(Expression(0, Sub)) at (prev + 0, 26) to (start + 0, 33) = (c0 - c1) -- Code(Counter(0)) at (prev + 3, 9) to (start + 0, 10) +- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 10) Highest counter ID seen: c1 diff --git a/tests/coverage/async/async_block.coverage b/tests/coverage/async/async_block.coverage index 29d90931fa8df..a8accf7945b57 100644 --- a/tests/coverage/async/async_block.coverage +++ b/tests/coverage/async/async_block.coverage @@ -5,14 +5,13 @@ LL| |extern crate executor; LL| | LL| 1|fn main() { - LL| 16| for i in 0..16 { - ^1 + LL| 1| for i in 0..16 { LL| 16| let future = async { LL| 16| if i >= 12 { LL| 4| println!("big"); - LL| 12| } else { + LL| | } else { LL| 12| println!("small"); - LL| 12| } + LL| | } LL| 16| }; LL| 16| executor::block_on(future); LL| | } diff --git a/tests/coverage/async/async_closure.cov-map b/tests/coverage/async/async_closure.cov-map index 53128dd7a48b0..01d33321c6ba8 100644 --- a/tests/coverage/async/async_closure.cov-map +++ b/tests/coverage/async/async_closure.cov-map @@ -1,65 +1,63 @@ Function name: async_closure::call_once:: -Raw bytes (9): 0x[01, 01, 00, 01, 01, 06, 01, 00, 2a] +Raw bytes (9): 0x[01, 01, 00, 01, 01, 07, 01, 00, 2a] Number of files: 1 - file 0 => $DIR/async_closure.rs Number of expressions: 0 Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 6, 1) to (start + 0, 42) +- Code(Counter(0)) at (prev + 7, 1) to (start + 0, 42) Highest counter ID seen: c0 Function name: async_closure::call_once::::{closure#0} -Raw bytes (21): 0x[01, 01, 01, 05, 09, 03, 01, 06, 2b, 00, 2c, 01, 01, 05, 00, 0e, 02, 01, 01, 00, 02] +Raw bytes (26): 0x[01, 01, 01, 05, 09, 04, 01, 07, 2b, 00, 2c, 01, 01, 05, 00, 08, 01, 00, 09, 00, 0e, 02, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/async_closure.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(1), rhs = Counter(2) -Number of file 0 mappings: 3 -- Code(Counter(0)) at (prev + 6, 43) to (start + 0, 44) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) +Number of file 0 mappings: 4 +- Code(Counter(0)) at (prev + 7, 43) to (start + 0, 44) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 8) +- Code(Counter(0)) at (prev + 0, 9) to (start + 0, 14) - Code(Expression(0, Sub)) at (prev + 1, 1) to (start + 0, 2) = (c1 - c2) Highest counter ID seen: c0 Function name: async_closure::main -Raw bytes (44): 0x[01, 01, 00, 08, 01, 0a, 01, 00, 0e, 01, 01, 09, 00, 16, 01, 01, 05, 00, 17, 01, 00, 18, 00, 27, 01, 01, 05, 00, 17, 01, 00, 18, 00, 21, 01, 00, 22, 00, 2f, 01, 01, 01, 00, 02] +Raw bytes (29): 0x[01, 01, 00, 05, 01, 0b, 01, 00, 0e, 01, 02, 05, 00, 28, 01, 01, 05, 00, 31, 01, 00, 05, 00, 17, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/async_closure.rs Number of expressions: 0 -Number of file 0 mappings: 8 -- Code(Counter(0)) at (prev + 10, 1) to (start + 0, 14) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 22) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 23) -- Code(Counter(0)) at (prev + 0, 24) to (start + 0, 39) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 23) -- Code(Counter(0)) at (prev + 0, 24) to (start + 0, 33) -- Code(Counter(0)) at (prev + 0, 34) to (start + 0, 47) +Number of file 0 mappings: 5 +- Code(Counter(0)) at (prev + 11, 1) to (start + 0, 14) +- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 40) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 49) +- Code(Counter(0)) at (prev + 0, 5) to (start + 0, 23) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: async_closure::main::{closure#0} -Raw bytes (9): 0x[01, 01, 00, 01, 01, 0b, 22, 00, 24] +Raw bytes (9): 0x[01, 01, 00, 01, 01, 0c, 22, 00, 24] Number of files: 1 - file 0 => $DIR/async_closure.rs Number of expressions: 0 Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 11, 34) to (start + 0, 36) +- Code(Counter(0)) at (prev + 12, 34) to (start + 0, 36) Highest counter ID seen: c0 Function name: async_closure::main::{closure#0} -Raw bytes (9): 0x[01, 01, 00, 01, 01, 0b, 22, 00, 24] +Raw bytes (9): 0x[01, 01, 00, 01, 01, 0c, 22, 00, 24] Number of files: 1 - file 0 => $DIR/async_closure.rs Number of expressions: 0 Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 11, 34) to (start + 0, 36) +- Code(Counter(0)) at (prev + 12, 34) to (start + 0, 36) Highest counter ID seen: c0 Function name: async_closure::main::{closure#0}::{closure#0}:: -Raw bytes (9): 0x[01, 01, 00, 01, 01, 0b, 22, 00, 24] +Raw bytes (9): 0x[01, 01, 00, 01, 01, 0c, 22, 00, 24] Number of files: 1 - file 0 => $DIR/async_closure.rs Number of expressions: 0 Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 11, 34) to (start + 0, 36) +- Code(Counter(0)) at (prev + 12, 34) to (start + 0, 36) Highest counter ID seen: c0 diff --git a/tests/coverage/async/async_closure.coverage b/tests/coverage/async/async_closure.coverage index 14f043415eaca..47d02eafd1ddb 100644 --- a/tests/coverage/async/async_closure.coverage +++ b/tests/coverage/async/async_closure.coverage @@ -1,4 +1,5 @@ LL| |//@ edition: 2021 + LL| |//@ min-llvm-version: 23 LL| | LL| |//@ aux-build: executor.rs LL| |extern crate executor; @@ -9,7 +10,6 @@ LL| | LL| 1|pub fn main() { LL| 3| let async_closure = async || {}; - ^1 ------------------ | async_closure::main::{closure#0}: | LL| 1| let async_closure = async || {}; diff --git a/tests/coverage/async/async_closure.rs b/tests/coverage/async/async_closure.rs index 85c5df1f1abb8..59f7118fd64c2 100644 --- a/tests/coverage/async/async_closure.rs +++ b/tests/coverage/async/async_closure.rs @@ -1,4 +1,5 @@ //@ edition: 2021 +//@ min-llvm-version: 23 //@ aux-build: executor.rs extern crate executor; diff --git a/tests/coverage/async/async_closure2.cov-map b/tests/coverage/async/async_closure2.cov-map index bd58e4db50841..c7fad7e1096e3 100644 --- a/tests/coverage/async/async_closure2.cov-map +++ b/tests/coverage/async/async_closure2.cov-map @@ -1,72 +1,66 @@ Function name: async_closure2::call_once:: -Raw bytes (9): 0x[01, 01, 00, 01, 01, 0c, 01, 00, 2a] +Raw bytes (9): 0x[01, 01, 00, 01, 01, 0d, 01, 00, 2a] Number of files: 1 - file 0 => $DIR/async_closure2.rs Number of expressions: 0 Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 12, 1) to (start + 0, 42) +- Code(Counter(0)) at (prev + 13, 1) to (start + 0, 42) Highest counter ID seen: c0 Function name: async_closure2::call_once::::{closure#0} -Raw bytes (21): 0x[01, 01, 01, 05, 09, 03, 01, 0c, 2b, 00, 2c, 01, 01, 05, 00, 0e, 02, 01, 01, 00, 02] +Raw bytes (26): 0x[01, 01, 01, 05, 09, 04, 01, 0d, 2b, 00, 2c, 01, 01, 05, 00, 08, 01, 00, 09, 00, 0e, 02, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/async_closure2.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(1), rhs = Counter(2) -Number of file 0 mappings: 3 -- Code(Counter(0)) at (prev + 12, 43) to (start + 0, 44) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) +Number of file 0 mappings: 4 +- Code(Counter(0)) at (prev + 13, 43) to (start + 0, 44) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 8) +- Code(Counter(0)) at (prev + 0, 9) to (start + 0, 14) - Code(Expression(0, Sub)) at (prev + 1, 1) to (start + 0, 2) = (c1 - c2) Highest counter ID seen: c0 Function name: async_closure2::main -Raw bytes (54): 0x[01, 01, 00, 0a, 01, 10, 01, 00, 0e, 01, 01, 09, 00, 16, 01, 04, 05, 00, 17, 01, 00, 18, 00, 21, 01, 00, 22, 00, 2f, 01, 01, 05, 00, 0f, 01, 00, 10, 00, 15, 01, 00, 16, 00, 1a, 01, 00, 1b, 00, 2b, 05, 01, 01, 00, 02] +Raw bytes (39): 0x[01, 01, 00, 07, 01, 11, 01, 00, 0e, 01, 05, 05, 00, 31, 01, 00, 05, 00, 17, 01, 01, 05, 00, 0f, 01, 00, 10, 00, 2c, 01, 00, 2e, 00, 2f, 05, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/async_closure2.rs Number of expressions: 0 -Number of file 0 mappings: 10 -- Code(Counter(0)) at (prev + 16, 1) to (start + 0, 14) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 22) -- Code(Counter(0)) at (prev + 4, 5) to (start + 0, 23) -- Code(Counter(0)) at (prev + 0, 24) to (start + 0, 33) -- Code(Counter(0)) at (prev + 0, 34) to (start + 0, 47) +Number of file 0 mappings: 7 +- Code(Counter(0)) at (prev + 17, 1) to (start + 0, 14) +- Code(Counter(0)) at (prev + 5, 5) to (start + 0, 49) +- Code(Counter(0)) at (prev + 0, 5) to (start + 0, 23) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15) -- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 21) -- Code(Counter(0)) at (prev + 0, 22) to (start + 0, 26) -- Code(Counter(0)) at (prev + 0, 27) to (start + 0, 43) +- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 44) +- Code(Counter(0)) at (prev + 0, 46) to (start + 0, 47) - Code(Counter(1)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c1 Function name: async_closure2::main::{closure#0} -Raw bytes (44): 0x[01, 01, 00, 08, 01, 11, 22, 00, 23, 01, 01, 09, 00, 0e, 01, 00, 0f, 00, 18, 01, 00, 1c, 00, 2c, 01, 01, 09, 00, 0e, 01, 00, 0f, 00, 18, 01, 00, 1c, 00, 2c, 01, 01, 05, 00, 06] +Raw bytes (34): 0x[01, 01, 00, 06, 01, 12, 22, 00, 23, 01, 01, 09, 00, 2d, 01, 00, 09, 00, 0e, 01, 01, 09, 00, 2d, 01, 00, 09, 00, 0e, 01, 01, 05, 00, 06] Number of files: 1 - file 0 => $DIR/async_closure2.rs Number of expressions: 0 -Number of file 0 mappings: 8 -- Code(Counter(0)) at (prev + 17, 34) to (start + 0, 35) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 24) -- Code(Counter(0)) at (prev + 0, 28) to (start + 0, 44) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 24) -- Code(Counter(0)) at (prev + 0, 28) to (start + 0, 44) +Number of file 0 mappings: 6 +- Code(Counter(0)) at (prev + 18, 34) to (start + 0, 35) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 45) +- Code(Counter(0)) at (prev + 0, 9) to (start + 0, 14) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 45) +- Code(Counter(0)) at (prev + 0, 9) to (start + 0, 14) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 6) Highest counter ID seen: c0 Function name: async_closure2::main::{closure#0}::{closure#0}::<_> (unused) -Raw bytes (44): 0x[01, 01, 00, 08, 00, 11, 22, 00, 23, 00, 01, 09, 00, 0e, 00, 00, 0f, 00, 18, 00, 00, 1c, 00, 2c, 00, 01, 09, 00, 0e, 00, 00, 0f, 00, 18, 00, 00, 1c, 00, 2c, 00, 01, 05, 00, 06] +Raw bytes (34): 0x[01, 01, 00, 06, 00, 12, 22, 00, 23, 00, 01, 09, 00, 2d, 00, 00, 09, 00, 0e, 00, 01, 09, 00, 2d, 00, 00, 09, 00, 0e, 00, 01, 05, 00, 06] Number of files: 1 - file 0 => $DIR/async_closure2.rs Number of expressions: 0 -Number of file 0 mappings: 8 -- Code(Zero) at (prev + 17, 34) to (start + 0, 35) -- Code(Zero) at (prev + 1, 9) to (start + 0, 14) -- Code(Zero) at (prev + 0, 15) to (start + 0, 24) -- Code(Zero) at (prev + 0, 28) to (start + 0, 44) -- Code(Zero) at (prev + 1, 9) to (start + 0, 14) -- Code(Zero) at (prev + 0, 15) to (start + 0, 24) -- Code(Zero) at (prev + 0, 28) to (start + 0, 44) +Number of file 0 mappings: 6 +- Code(Zero) at (prev + 18, 34) to (start + 0, 35) +- Code(Zero) at (prev + 1, 9) to (start + 0, 45) +- Code(Zero) at (prev + 0, 9) to (start + 0, 14) +- Code(Zero) at (prev + 1, 9) to (start + 0, 45) +- Code(Zero) at (prev + 0, 9) to (start + 0, 14) - Code(Zero) at (prev + 1, 5) to (start + 0, 6) Highest counter ID seen: (none) diff --git a/tests/coverage/async/async_closure2.coverage b/tests/coverage/async/async_closure2.coverage index cd79b303fb66c..5e3cb3e200acf 100644 --- a/tests/coverage/async/async_closure2.coverage +++ b/tests/coverage/async/async_closure2.coverage @@ -1,6 +1,7 @@ LL| |// Regression test for . LL| | LL| |//@ edition: 2021 + LL| |//@ min-llvm-version: 23 LL| | LL| |//@ aux-build: executor.rs LL| |extern crate executor; diff --git a/tests/coverage/async/async_closure2.rs b/tests/coverage/async/async_closure2.rs index 01e268d928d34..dcb7a5de8ca2d 100644 --- a/tests/coverage/async/async_closure2.rs +++ b/tests/coverage/async/async_closure2.rs @@ -1,6 +1,7 @@ // Regression test for . //@ edition: 2021 +//@ min-llvm-version: 23 //@ aux-build: executor.rs extern crate executor; diff --git a/tests/coverage/async/await_ready.cov-map b/tests/coverage/async/await_ready.cov-map index a7eb051ff0938..fe0612bb5ad27 100644 --- a/tests/coverage/async/await_ready.cov-map +++ b/tests/coverage/async/await_ready.cov-map @@ -8,15 +8,16 @@ Number of file 0 mappings: 1 Highest counter ID seen: c0 Function name: await_ready::await_ready::{closure#0} -Raw bytes (21): 0x[01, 01, 01, 05, 09, 03, 01, 0e, 1e, 00, 1f, 01, 02, 05, 01, 0f, 02, 02, 01, 00, 02] +Raw bytes (26): 0x[01, 01, 01, 05, 09, 04, 01, 0e, 1e, 00, 1f, 01, 02, 05, 00, 0c, 01, 01, 0a, 00, 0f, 02, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/await_ready.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(1), rhs = Counter(2) -Number of file 0 mappings: 3 +Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 14, 30) to (start + 0, 31) -- Code(Counter(0)) at (prev + 2, 5) to (start + 1, 15) -- Code(Expression(0, Sub)) at (prev + 2, 1) to (start + 0, 2) +- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 12) +- Code(Counter(0)) at (prev + 1, 10) to (start + 0, 15) +- Code(Expression(0, Sub)) at (prev + 1, 1) to (start + 0, 2) = (c1 - c2) Highest counter ID seen: c0 diff --git a/tests/coverage/async/closure_macro_async.cov-map b/tests/coverage/async/closure_macro_async.cov-map index b6dd4a930c78e..23d22584f4a17 100644 --- a/tests/coverage/async/closure_macro_async.cov-map +++ b/tests/coverage/async/closure_macro_async.cov-map @@ -19,22 +19,19 @@ Number of file 0 mappings: 1 Highest counter ID seen: c0 Function name: closure_macro_async::test::{closure#0} -Raw bytes (61): 0x[01, 01, 01, 01, 05, 0b, 01, 25, 2b, 00, 2c, 01, 01, 05, 00, 0d, 02, 01, 09, 00, 0f, 01, 00, 12, 00, 1b, 01, 00, 1c, 00, 34, 05, 00, 54, 00, 55, 02, 02, 09, 00, 1f, 02, 00, 22, 00, 2e, 02, 01, 0d, 00, 2d, 02, 01, 05, 00, 0b, 01, 01, 01, 00, 02] +Raw bytes (56): 0x[01, 01, 01, 01, 05, 0a, 01, 25, 2b, 00, 2c, 01, 01, 05, 00, 0d, 01, 00, 0e, 00, 20, 01, 01, 12, 00, 1b, 01, 00, 1c, 00, 36, 05, 00, 54, 00, 55, 02, 02, 22, 00, 35, 02, 01, 0d, 00, 2d, 02, 01, 05, 00, 0b, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/closure_macro_async.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 11 +Number of file 0 mappings: 10 - Code(Counter(0)) at (prev + 37, 43) to (start + 0, 44) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) -- Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 15) - = (c0 - c1) -- Code(Counter(0)) at (prev + 0, 18) to (start + 0, 27) -- Code(Counter(0)) at (prev + 0, 28) to (start + 0, 52) +- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 32) +- Code(Counter(0)) at (prev + 1, 18) to (start + 0, 27) +- Code(Counter(0)) at (prev + 0, 28) to (start + 0, 54) - Code(Counter(1)) at (prev + 0, 84) to (start + 0, 85) -- Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 31) - = (c0 - c1) -- Code(Expression(0, Sub)) at (prev + 0, 34) to (start + 0, 46) +- Code(Expression(0, Sub)) at (prev + 2, 34) to (start + 0, 53) = (c0 - c1) - Code(Expression(0, Sub)) at (prev + 1, 13) to (start + 0, 45) = (c0 - c1) @@ -44,17 +41,18 @@ Number of file 0 mappings: 11 Highest counter ID seen: c1 Function name: closure_macro_async::test::{closure#0}::{closure#0} -Raw bytes (51): 0x[01, 01, 01, 01, 05, 09, 01, 14, 1c, 00, 1d, 01, 02, 11, 00, 18, 01, 00, 1b, 00, 22, 01, 01, 10, 00, 21, 05, 01, 11, 00, 19, 05, 01, 11, 00, 27, 02, 02, 11, 00, 16, 02, 00, 17, 00, 1e, 01, 02, 09, 00, 0a] +Raw bytes (56): 0x[01, 01, 01, 01, 05, 0a, 01, 14, 1c, 00, 1d, 01, 02, 1b, 00, 22, 01, 00, 33, 00, 34, 01, 01, 10, 00, 21, 05, 01, 11, 00, 19, 05, 00, 20, 00, 27, 05, 01, 11, 00, 27, 02, 02, 11, 00, 16, 02, 00, 17, 00, 1e, 01, 02, 09, 00, 0a] Number of files: 1 - file 0 => $DIR/closure_macro_async.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 9 +Number of file 0 mappings: 10 - Code(Counter(0)) at (prev + 20, 28) to (start + 0, 29) -- Code(Counter(0)) at (prev + 2, 17) to (start + 0, 24) -- Code(Counter(0)) at (prev + 0, 27) to (start + 0, 34) +- Code(Counter(0)) at (prev + 2, 27) to (start + 0, 34) +- Code(Counter(0)) at (prev + 0, 51) to (start + 0, 52) - Code(Counter(0)) at (prev + 1, 16) to (start + 0, 33) - Code(Counter(1)) at (prev + 1, 17) to (start + 0, 25) +- Code(Counter(1)) at (prev + 0, 32) to (start + 0, 39) - Code(Counter(1)) at (prev + 1, 17) to (start + 0, 39) - Code(Expression(0, Sub)) at (prev + 2, 17) to (start + 0, 22) = (c0 - c1) diff --git a/tests/coverage/attr/nested.cov-map b/tests/coverage/attr/nested.cov-map index 8ca218f7267fd..ae8af35e507de 100644 --- a/tests/coverage/attr/nested.cov-map +++ b/tests/coverage/attr/nested.cov-map @@ -1,24 +1,22 @@ Function name: nested::closure_expr -Raw bytes (24): 0x[01, 01, 00, 04, 01, 40, 01, 00, 12, 01, 01, 09, 00, 0f, 01, 0a, 05, 00, 0d, 01, 01, 01, 00, 02] +Raw bytes (19): 0x[01, 01, 00, 03, 01, 40, 01, 00, 12, 01, 0b, 05, 00, 0f, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/nested.rs Number of expressions: 0 -Number of file 0 mappings: 4 +Number of file 0 mappings: 3 - Code(Counter(0)) at (prev + 64, 1) to (start + 0, 18) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 15) -- Code(Counter(0)) at (prev + 10, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 11, 5) to (start + 0, 15) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: nested::closure_tail -Raw bytes (24): 0x[01, 01, 00, 04, 01, 4f, 01, 00, 12, 01, 01, 09, 00, 0f, 01, 10, 05, 00, 0d, 01, 01, 01, 00, 02] +Raw bytes (19): 0x[01, 01, 00, 03, 01, 4f, 01, 00, 12, 01, 11, 05, 00, 0f, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/nested.rs Number of expressions: 0 -Number of file 0 mappings: 4 +Number of file 0 mappings: 3 - Code(Counter(0)) at (prev + 79, 1) to (start + 0, 18) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 15) -- Code(Counter(0)) at (prev + 16, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 17, 5) to (start + 0, 15) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/attr/nested.coverage b/tests/coverage/attr/nested.coverage index 6bd24d6793610..a0bf05a423534 100644 --- a/tests/coverage/attr/nested.coverage +++ b/tests/coverage/attr/nested.coverage @@ -62,7 +62,7 @@ LL| |} LL| | LL| 1|fn closure_expr() { - LL| 1| let _outer = #[coverage(off)] + LL| | let _outer = #[coverage(off)] LL| | || { LL| | let _middle = || { LL| | let _inner = || { @@ -77,7 +77,7 @@ LL| | LL| |// This syntax is allowed, even without #![feature(stmt_expr_attributes)]. LL| 1|fn closure_tail() { - LL| 1| let _outer = { + LL| | let _outer = { LL| | #[coverage(off)] LL| | || { LL| | let _middle = { diff --git a/tests/coverage/attr/off-on-sandwich.cov-map b/tests/coverage/attr/off-on-sandwich.cov-map index c0c6eab57108d..ef31c56fcaa2f 100644 --- a/tests/coverage/attr/off-on-sandwich.cov-map +++ b/tests/coverage/attr/off-on-sandwich.cov-map @@ -1,36 +1,36 @@ Function name: off_on_sandwich::dense_a::dense_b -Raw bytes (24): 0x[01, 01, 00, 04, 01, 10, 05, 00, 11, 01, 01, 09, 00, 10, 01, 01, 09, 00, 10, 01, 05, 05, 00, 06] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 10, 05, 00, 11, 01, 01, 09, 00, 12, 01, 01, 09, 00, 12, 01, 05, 05, 00, 06] Number of files: 1 - file 0 => $DIR/off-on-sandwich.rs Number of expressions: 0 Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 16, 5) to (start + 0, 17) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 16) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 16) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 18) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 18) - Code(Counter(0)) at (prev + 5, 5) to (start + 0, 6) Highest counter ID seen: c0 Function name: off_on_sandwich::sparse_a::sparse_b::sparse_c -Raw bytes (24): 0x[01, 01, 00, 04, 01, 22, 09, 00, 16, 01, 01, 0d, 00, 15, 01, 01, 0d, 00, 15, 01, 09, 09, 00, 0a] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 22, 09, 00, 16, 01, 01, 0d, 00, 17, 01, 01, 0d, 00, 17, 01, 09, 09, 00, 0a] Number of files: 1 - file 0 => $DIR/off-on-sandwich.rs Number of expressions: 0 Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 34, 9) to (start + 0, 22) -- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 21) -- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 21) +- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 23) +- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 23) - Code(Counter(0)) at (prev + 9, 9) to (start + 0, 10) Highest counter ID seen: c0 Function name: off_on_sandwich::sparse_a::sparse_b::sparse_c::sparse_d -Raw bytes (24): 0x[01, 01, 00, 04, 01, 25, 0d, 00, 1a, 01, 01, 11, 00, 19, 01, 01, 11, 00, 19, 01, 05, 0d, 00, 0e] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 25, 0d, 00, 1a, 01, 01, 11, 00, 1b, 01, 01, 11, 00, 1b, 01, 05, 0d, 00, 0e] Number of files: 1 - file 0 => $DIR/off-on-sandwich.rs Number of expressions: 0 Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 37, 13) to (start + 0, 26) -- Code(Counter(0)) at (prev + 1, 17) to (start + 0, 25) -- Code(Counter(0)) at (prev + 1, 17) to (start + 0, 25) +- Code(Counter(0)) at (prev + 1, 17) to (start + 0, 27) +- Code(Counter(0)) at (prev + 1, 17) to (start + 0, 27) - Code(Counter(0)) at (prev + 5, 13) to (start + 0, 14) Highest counter ID seen: c0 diff --git a/tests/coverage/attr/trait-impl-inherit.cov-map b/tests/coverage/attr/trait-impl-inherit.cov-map index 6aedd1043f97d..bf10083dd2909 100644 --- a/tests/coverage/attr/trait-impl-inherit.cov-map +++ b/tests/coverage/attr/trait-impl-inherit.cov-map @@ -1,11 +1,12 @@ Function name: ::f -Raw bytes (19): 0x[01, 01, 00, 03, 01, 11, 05, 00, 10, 01, 01, 09, 00, 11, 01, 01, 05, 00, 06] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 11, 05, 00, 10, 01, 01, 09, 00, 11, 01, 00, 12, 00, 1a, 01, 01, 05, 00, 06] Number of files: 1 - file 0 => $DIR/trait-impl-inherit.rs Number of expressions: 0 -Number of file 0 mappings: 3 +Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 17, 5) to (start + 0, 16) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 17) +- Code(Counter(0)) at (prev + 0, 18) to (start + 0, 26) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 6) Highest counter ID seen: c0 diff --git a/tests/coverage/auto-derived.auto.cov-map b/tests/coverage/auto-derived.auto.cov-map index e3d411d895aaa..220fb794137e1 100644 --- a/tests/coverage/auto-derived.auto.cov-map +++ b/tests/coverage/auto-derived.auto.cov-map @@ -1,23 +1,22 @@ Function name: ::my_assoc_fn::inner_fn_on -Raw bytes (24): 0x[01, 01, 00, 04, 01, 1f, 09, 00, 19, 01, 01, 0d, 00, 10, 01, 00, 11, 00, 23, 01, 01, 09, 00, 0a] +Raw bytes (19): 0x[01, 01, 00, 03, 01, 1f, 09, 00, 19, 01, 01, 0d, 00, 24, 01, 01, 09, 00, 0a] Number of files: 1 - file 0 => $DIR/auto-derived.rs Number of expressions: 0 -Number of file 0 mappings: 4 +Number of file 0 mappings: 3 - Code(Counter(0)) at (prev + 31, 9) to (start + 0, 25) -- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 35) +- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 36) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10) Highest counter ID seen: c0 Function name: auto_derived::main -Raw bytes (19): 0x[01, 01, 00, 03, 01, 33, 01, 00, 0a, 01, 01, 05, 00, 1a, 01, 01, 01, 00, 02] +Raw bytes (19): 0x[01, 01, 00, 03, 01, 33, 01, 00, 0a, 01, 01, 05, 00, 1c, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/auto-derived.rs Number of expressions: 0 Number of file 0 mappings: 3 - Code(Counter(0)) at (prev + 51, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 26) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 28) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/auto-derived.base.cov-map b/tests/coverage/auto-derived.base.cov-map index 2dcd616300d9d..c84afc33ad3d5 100644 --- a/tests/coverage/auto-derived.base.cov-map +++ b/tests/coverage/auto-derived.base.cov-map @@ -1,61 +1,57 @@ Function name: ::my_assoc_fn -Raw bytes (34): 0x[01, 01, 00, 06, 01, 19, 05, 00, 15, 01, 0a, 0d, 00, 14, 01, 04, 09, 00, 12, 01, 01, 09, 00, 11, 01, 01, 09, 00, 14, 01, 01, 05, 00, 06] +Raw bytes (29): 0x[01, 01, 00, 05, 01, 19, 05, 00, 15, 01, 0e, 09, 00, 12, 01, 01, 09, 00, 13, 01, 01, 09, 00, 16, 01, 01, 05, 00, 06] Number of files: 1 - file 0 => $DIR/auto-derived.rs Number of expressions: 0 -Number of file 0 mappings: 6 +Number of file 0 mappings: 5 - Code(Counter(0)) at (prev + 25, 5) to (start + 0, 21) -- Code(Counter(0)) at (prev + 10, 13) to (start + 0, 20) -- Code(Counter(0)) at (prev + 4, 9) to (start + 0, 18) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 17) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 20) +- Code(Counter(0)) at (prev + 14, 9) to (start + 0, 18) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 19) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 22) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 6) Highest counter ID seen: c0 Function name: ::my_assoc_fn::inner_fn -Raw bytes (24): 0x[01, 01, 00, 04, 01, 1a, 09, 00, 16, 01, 01, 0d, 00, 10, 01, 00, 11, 00, 1e, 01, 01, 09, 00, 0a] +Raw bytes (19): 0x[01, 01, 00, 03, 01, 1a, 09, 00, 16, 01, 01, 0d, 00, 1f, 01, 01, 09, 00, 0a] Number of files: 1 - file 0 => $DIR/auto-derived.rs Number of expressions: 0 -Number of file 0 mappings: 4 +Number of file 0 mappings: 3 - Code(Counter(0)) at (prev + 26, 9) to (start + 0, 22) -- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 30) +- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 31) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10) Highest counter ID seen: c0 Function name: ::my_assoc_fn::inner_fn_on -Raw bytes (24): 0x[01, 01, 00, 04, 01, 1f, 09, 00, 19, 01, 01, 0d, 00, 10, 01, 00, 11, 00, 23, 01, 01, 09, 00, 0a] +Raw bytes (19): 0x[01, 01, 00, 03, 01, 1f, 09, 00, 19, 01, 01, 0d, 00, 24, 01, 01, 09, 00, 0a] Number of files: 1 - file 0 => $DIR/auto-derived.rs Number of expressions: 0 -Number of file 0 mappings: 4 +Number of file 0 mappings: 3 - Code(Counter(0)) at (prev + 31, 9) to (start + 0, 25) -- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 35) +- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 36) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10) Highest counter ID seen: c0 Function name: ::my_assoc_fn::{closure#0} -Raw bytes (24): 0x[01, 01, 00, 04, 01, 23, 1a, 00, 1b, 01, 01, 0d, 00, 10, 01, 00, 11, 00, 1d, 01, 01, 09, 00, 0a] +Raw bytes (19): 0x[01, 01, 00, 03, 01, 23, 1a, 00, 1b, 01, 01, 0d, 00, 1e, 01, 01, 09, 00, 0a] Number of files: 1 - file 0 => $DIR/auto-derived.rs Number of expressions: 0 -Number of file 0 mappings: 4 +Number of file 0 mappings: 3 - Code(Counter(0)) at (prev + 35, 26) to (start + 0, 27) -- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 29) +- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 30) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10) Highest counter ID seen: c0 Function name: auto_derived::main -Raw bytes (19): 0x[01, 01, 00, 03, 01, 33, 01, 00, 0a, 01, 01, 05, 00, 1a, 01, 01, 01, 00, 02] +Raw bytes (19): 0x[01, 01, 00, 03, 01, 33, 01, 00, 0a, 01, 01, 05, 00, 1c, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/auto-derived.rs Number of expressions: 0 Number of file 0 mappings: 3 - Code(Counter(0)) at (prev + 51, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 26) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 28) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/auto-derived.on.cov-map b/tests/coverage/auto-derived.on.cov-map index 2dcd616300d9d..c84afc33ad3d5 100644 --- a/tests/coverage/auto-derived.on.cov-map +++ b/tests/coverage/auto-derived.on.cov-map @@ -1,61 +1,57 @@ Function name: ::my_assoc_fn -Raw bytes (34): 0x[01, 01, 00, 06, 01, 19, 05, 00, 15, 01, 0a, 0d, 00, 14, 01, 04, 09, 00, 12, 01, 01, 09, 00, 11, 01, 01, 09, 00, 14, 01, 01, 05, 00, 06] +Raw bytes (29): 0x[01, 01, 00, 05, 01, 19, 05, 00, 15, 01, 0e, 09, 00, 12, 01, 01, 09, 00, 13, 01, 01, 09, 00, 16, 01, 01, 05, 00, 06] Number of files: 1 - file 0 => $DIR/auto-derived.rs Number of expressions: 0 -Number of file 0 mappings: 6 +Number of file 0 mappings: 5 - Code(Counter(0)) at (prev + 25, 5) to (start + 0, 21) -- Code(Counter(0)) at (prev + 10, 13) to (start + 0, 20) -- Code(Counter(0)) at (prev + 4, 9) to (start + 0, 18) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 17) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 20) +- Code(Counter(0)) at (prev + 14, 9) to (start + 0, 18) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 19) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 22) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 6) Highest counter ID seen: c0 Function name: ::my_assoc_fn::inner_fn -Raw bytes (24): 0x[01, 01, 00, 04, 01, 1a, 09, 00, 16, 01, 01, 0d, 00, 10, 01, 00, 11, 00, 1e, 01, 01, 09, 00, 0a] +Raw bytes (19): 0x[01, 01, 00, 03, 01, 1a, 09, 00, 16, 01, 01, 0d, 00, 1f, 01, 01, 09, 00, 0a] Number of files: 1 - file 0 => $DIR/auto-derived.rs Number of expressions: 0 -Number of file 0 mappings: 4 +Number of file 0 mappings: 3 - Code(Counter(0)) at (prev + 26, 9) to (start + 0, 22) -- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 30) +- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 31) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10) Highest counter ID seen: c0 Function name: ::my_assoc_fn::inner_fn_on -Raw bytes (24): 0x[01, 01, 00, 04, 01, 1f, 09, 00, 19, 01, 01, 0d, 00, 10, 01, 00, 11, 00, 23, 01, 01, 09, 00, 0a] +Raw bytes (19): 0x[01, 01, 00, 03, 01, 1f, 09, 00, 19, 01, 01, 0d, 00, 24, 01, 01, 09, 00, 0a] Number of files: 1 - file 0 => $DIR/auto-derived.rs Number of expressions: 0 -Number of file 0 mappings: 4 +Number of file 0 mappings: 3 - Code(Counter(0)) at (prev + 31, 9) to (start + 0, 25) -- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 35) +- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 36) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10) Highest counter ID seen: c0 Function name: ::my_assoc_fn::{closure#0} -Raw bytes (24): 0x[01, 01, 00, 04, 01, 23, 1a, 00, 1b, 01, 01, 0d, 00, 10, 01, 00, 11, 00, 1d, 01, 01, 09, 00, 0a] +Raw bytes (19): 0x[01, 01, 00, 03, 01, 23, 1a, 00, 1b, 01, 01, 0d, 00, 1e, 01, 01, 09, 00, 0a] Number of files: 1 - file 0 => $DIR/auto-derived.rs Number of expressions: 0 -Number of file 0 mappings: 4 +Number of file 0 mappings: 3 - Code(Counter(0)) at (prev + 35, 26) to (start + 0, 27) -- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 29) +- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 30) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10) Highest counter ID seen: c0 Function name: auto_derived::main -Raw bytes (19): 0x[01, 01, 00, 03, 01, 33, 01, 00, 0a, 01, 01, 05, 00, 1a, 01, 01, 01, 00, 02] +Raw bytes (19): 0x[01, 01, 00, 03, 01, 33, 01, 00, 0a, 01, 01, 05, 00, 1c, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/auto-derived.rs Number of expressions: 0 Number of file 0 mappings: 3 - Code(Counter(0)) at (prev + 51, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 26) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 28) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/bad_counter_ids.cov-map b/tests/coverage/bad_counter_ids.cov-map index 309b29220144e..2b424629f011f 100644 --- a/tests/coverage/bad_counter_ids.cov-map +++ b/tests/coverage/bad_counter_ids.cov-map @@ -1,96 +1,120 @@ Function name: bad_counter_ids::eq_bad -Raw bytes (24): 0x[01, 01, 00, 04, 01, 24, 01, 00, 0c, 01, 01, 05, 00, 0d, 01, 01, 05, 00, 0f, 00, 01, 01, 00, 02] +Raw bytes (39): 0x[01, 01, 00, 07, 01, 24, 01, 00, 0c, 01, 01, 05, 00, 0d, 01, 00, 0e, 00, 11, 01, 01, 05, 00, 0f, 01, 00, 10, 00, 16, 01, 00, 18, 00, 1e, 00, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/bad_counter_ids.rs Number of expressions: 0 -Number of file 0 mappings: 4 +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 36, 1) to (start + 0, 12) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 17) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15) +- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 22) +- Code(Counter(0)) at (prev + 0, 24) to (start + 0, 30) - Code(Zero) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: bad_counter_ids::eq_bad_message -Raw bytes (24): 0x[01, 01, 00, 04, 01, 29, 01, 00, 14, 01, 01, 05, 00, 0d, 01, 01, 05, 00, 0f, 00, 01, 01, 00, 02] +Raw bytes (39): 0x[01, 01, 00, 07, 01, 29, 01, 00, 14, 01, 01, 05, 00, 0d, 01, 00, 0e, 00, 11, 01, 01, 05, 00, 0f, 01, 00, 10, 00, 16, 01, 00, 18, 00, 1e, 00, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/bad_counter_ids.rs Number of expressions: 0 -Number of file 0 mappings: 4 +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 41, 1) to (start + 0, 20) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 17) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15) +- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 22) +- Code(Counter(0)) at (prev + 0, 24) to (start + 0, 30) - Code(Zero) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: bad_counter_ids::eq_good -Raw bytes (24): 0x[01, 01, 00, 04, 01, 10, 01, 00, 0d, 01, 01, 05, 00, 0d, 01, 01, 05, 00, 0f, 01, 01, 01, 00, 02] +Raw bytes (39): 0x[01, 01, 00, 07, 01, 10, 01, 00, 0d, 01, 01, 05, 00, 0d, 01, 00, 0e, 00, 11, 01, 01, 05, 00, 0f, 01, 00, 10, 00, 16, 01, 00, 18, 00, 1e, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/bad_counter_ids.rs Number of expressions: 0 -Number of file 0 mappings: 4 +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 16, 1) to (start + 0, 13) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 17) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15) +- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 22) +- Code(Counter(0)) at (prev + 0, 24) to (start + 0, 30) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: bad_counter_ids::eq_good_message -Raw bytes (24): 0x[01, 01, 00, 04, 01, 15, 01, 00, 15, 01, 01, 05, 00, 0d, 01, 01, 05, 00, 0f, 01, 01, 01, 00, 02] +Raw bytes (39): 0x[01, 01, 00, 07, 01, 15, 01, 00, 15, 01, 01, 05, 00, 0d, 01, 00, 0e, 00, 11, 01, 01, 05, 00, 0f, 01, 00, 10, 00, 16, 01, 00, 18, 00, 1e, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/bad_counter_ids.rs Number of expressions: 0 -Number of file 0 mappings: 4 +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 21, 1) to (start + 0, 21) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 17) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15) +- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 22) +- Code(Counter(0)) at (prev + 0, 24) to (start + 0, 30) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: bad_counter_ids::ne_bad -Raw bytes (24): 0x[01, 01, 00, 04, 01, 2e, 01, 00, 0c, 01, 01, 05, 00, 0d, 01, 01, 05, 00, 0f, 00, 01, 01, 00, 02] +Raw bytes (39): 0x[01, 01, 00, 07, 01, 2e, 01, 00, 0c, 01, 01, 05, 00, 0d, 01, 00, 0e, 00, 11, 01, 01, 05, 00, 0f, 01, 00, 10, 00, 16, 01, 00, 18, 00, 1e, 00, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/bad_counter_ids.rs Number of expressions: 0 -Number of file 0 mappings: 4 +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 46, 1) to (start + 0, 12) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 17) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15) +- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 22) +- Code(Counter(0)) at (prev + 0, 24) to (start + 0, 30) - Code(Zero) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: bad_counter_ids::ne_bad_message -Raw bytes (24): 0x[01, 01, 00, 04, 01, 33, 01, 00, 14, 01, 01, 05, 00, 0d, 01, 01, 05, 00, 0f, 00, 01, 01, 00, 02] +Raw bytes (39): 0x[01, 01, 00, 07, 01, 33, 01, 00, 14, 01, 01, 05, 00, 0d, 01, 00, 0e, 00, 11, 01, 01, 05, 00, 0f, 01, 00, 10, 00, 16, 01, 00, 18, 00, 1e, 00, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/bad_counter_ids.rs Number of expressions: 0 -Number of file 0 mappings: 4 +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 51, 1) to (start + 0, 20) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 17) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15) +- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 22) +- Code(Counter(0)) at (prev + 0, 24) to (start + 0, 30) - Code(Zero) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: bad_counter_ids::ne_good -Raw bytes (24): 0x[01, 01, 00, 04, 01, 1a, 01, 00, 0d, 01, 01, 05, 00, 0d, 01, 01, 05, 00, 0f, 01, 01, 01, 00, 02] +Raw bytes (39): 0x[01, 01, 00, 07, 01, 1a, 01, 00, 0d, 01, 01, 05, 00, 0d, 01, 00, 0e, 00, 11, 01, 01, 05, 00, 0f, 01, 00, 10, 00, 16, 01, 00, 18, 00, 1e, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/bad_counter_ids.rs Number of expressions: 0 -Number of file 0 mappings: 4 +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 26, 1) to (start + 0, 13) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 17) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15) +- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 22) +- Code(Counter(0)) at (prev + 0, 24) to (start + 0, 30) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: bad_counter_ids::ne_good_message -Raw bytes (24): 0x[01, 01, 00, 04, 01, 1f, 01, 00, 15, 01, 01, 05, 00, 0d, 01, 01, 05, 00, 0f, 01, 01, 01, 00, 02] +Raw bytes (39): 0x[01, 01, 00, 07, 01, 1f, 01, 00, 15, 01, 01, 05, 00, 0d, 01, 00, 0e, 00, 11, 01, 01, 05, 00, 0f, 01, 00, 10, 00, 16, 01, 00, 18, 00, 1e, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/bad_counter_ids.rs Number of expressions: 0 -Number of file 0 mappings: 4 +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 31, 1) to (start + 0, 21) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 17) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15) +- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 22) +- Code(Counter(0)) at (prev + 0, 24) to (start + 0, 30) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/branch/fn-in-macro.cov-map b/tests/coverage/branch/fn-in-macro.cov-map index 7f77251d324df..f83ccc159f088 100644 --- a/tests/coverage/branch/fn-in-macro.cov-map +++ b/tests/coverage/branch/fn-in-macro.cov-map @@ -10,35 +10,35 @@ Number of file 0 mappings: 3 Highest counter ID seen: c0 Function name: fn_in_macro::fn_in_macro -Raw bytes (31): 0x[01, 01, 01, 01, 05, 05, 01, 0c, 09, 00, 19, 01, 01, 10, 00, 25, 05, 00, 2c, 02, 0e, 02, 02, 14, 02, 0e, 01, 03, 09, 00, 0a] +Raw bytes (31): 0x[01, 01, 01, 01, 05, 05, 01, 0c, 09, 00, 19, 01, 01, 10, 00, 2b, 05, 01, 11, 00, 1c, 02, 02, 11, 00, 1d, 01, 02, 09, 00, 0a] Number of files: 1 - file 0 => $DIR/fn-in-macro.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) Number of file 0 mappings: 5 - Code(Counter(0)) at (prev + 12, 9) to (start + 0, 25) -- Code(Counter(0)) at (prev + 1, 16) to (start + 0, 37) -- Code(Counter(1)) at (prev + 0, 44) to (start + 2, 14) -- Code(Expression(0, Sub)) at (prev + 2, 20) to (start + 2, 14) +- Code(Counter(0)) at (prev + 1, 16) to (start + 0, 43) +- Code(Counter(1)) at (prev + 1, 17) to (start + 0, 28) +- Code(Expression(0, Sub)) at (prev + 2, 17) to (start + 0, 29) = (c0 - c1) -- Code(Counter(0)) at (prev + 3, 9) to (start + 0, 10) +- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 10) Highest counter ID seen: c1 Function name: fn_in_macro::fn_not_in_macro -Raw bytes (38): 0x[01, 01, 01, 01, 05, 06, 01, 19, 01, 00, 15, 01, 01, 08, 00, 1d, 20, 05, 02, 00, 08, 00, 23, 05, 00, 24, 02, 06, 02, 02, 0c, 02, 06, 01, 03, 01, 00, 02] +Raw bytes (38): 0x[01, 01, 01, 01, 05, 06, 01, 19, 01, 00, 15, 01, 01, 08, 00, 23, 20, 05, 02, 00, 08, 00, 23, 05, 01, 09, 00, 14, 02, 02, 09, 00, 15, 01, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/fn-in-macro.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) Number of file 0 mappings: 6 - Code(Counter(0)) at (prev + 25, 1) to (start + 0, 21) -- Code(Counter(0)) at (prev + 1, 8) to (start + 0, 29) +- Code(Counter(0)) at (prev + 1, 8) to (start + 0, 35) - Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 0, 8) to (start + 0, 35) true = c1 false = (c0 - c1) -- Code(Counter(1)) at (prev + 0, 36) to (start + 2, 6) -- Code(Expression(0, Sub)) at (prev + 2, 12) to (start + 2, 6) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 20) +- Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 21) = (c0 - c1) -- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2) +- Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2) Highest counter ID seen: c1 diff --git a/tests/coverage/branch/fn-in-macro.coverage b/tests/coverage/branch/fn-in-macro.coverage index aa6f2f198e5f4..6806c27709140 100644 --- a/tests/coverage/branch/fn-in-macro.coverage +++ b/tests/coverage/branch/fn-in-macro.coverage @@ -12,9 +12,9 @@ LL| 1| fn fn_in_macro() { LL| 1| if core::hint::black_box(true) { LL| 1| say("true"); - LL| 1| } else { + LL| | } else { LL| 0| say("false"); - LL| 0| } + LL| | } LL| 1| } LL| | }; LL| |} @@ -28,9 +28,9 @@ | Branch (LL:8): [True: 1, False: 0] ------------------ LL| 1| say("true"); - LL| 1| } else { + LL| | } else { LL| 0| say("false"); - LL| 0| } + LL| | } LL| 1|} LL| | LL| |/// Function that is not in a macro, containing a branch that is in a macro. diff --git a/tests/coverage/branch/generics.cov-map b/tests/coverage/branch/generics.cov-map index cb03f2a79f761..91ae0b68fc2f0 100644 --- a/tests/coverage/branch/generics.cov-map +++ b/tests/coverage/branch/generics.cov-map @@ -1,54 +1,63 @@ Function name: generics::print_size::<()> -Raw bytes (38): 0x[01, 01, 01, 01, 05, 06, 01, 06, 01, 00, 13, 01, 01, 08, 00, 24, 20, 05, 02, 00, 08, 00, 24, 05, 00, 25, 02, 06, 02, 02, 0c, 02, 06, 01, 03, 01, 00, 02] +Raw bytes (48): 0x[01, 01, 01, 01, 05, 08, 01, 06, 01, 00, 13, 01, 01, 08, 00, 24, 20, 05, 02, 00, 08, 00, 24, 05, 01, 09, 00, 11, 05, 00, 12, 00, 1c, 02, 02, 09, 00, 11, 02, 00, 12, 00, 1d, 01, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/generics.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 6 +Number of file 0 mappings: 8 - Code(Counter(0)) at (prev + 6, 1) to (start + 0, 19) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 36) - Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 0, 8) to (start + 0, 36) true = c1 false = (c0 - c1) -- Code(Counter(1)) at (prev + 0, 37) to (start + 2, 6) -- Code(Expression(0, Sub)) at (prev + 2, 12) to (start + 2, 6) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 17) +- Code(Counter(1)) at (prev + 0, 18) to (start + 0, 28) +- Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 17) = (c0 - c1) -- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2) +- Code(Expression(0, Sub)) at (prev + 0, 18) to (start + 0, 29) + = (c0 - c1) +- Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2) Highest counter ID seen: c1 Function name: generics::print_size:: -Raw bytes (38): 0x[01, 01, 01, 01, 05, 06, 01, 06, 01, 00, 13, 01, 01, 08, 00, 24, 20, 05, 02, 00, 08, 00, 24, 05, 00, 25, 02, 06, 02, 02, 0c, 02, 06, 01, 03, 01, 00, 02] +Raw bytes (48): 0x[01, 01, 01, 01, 05, 08, 01, 06, 01, 00, 13, 01, 01, 08, 00, 24, 20, 05, 02, 00, 08, 00, 24, 05, 01, 09, 00, 11, 05, 00, 12, 00, 1c, 02, 02, 09, 00, 11, 02, 00, 12, 00, 1d, 01, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/generics.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 6 +Number of file 0 mappings: 8 - Code(Counter(0)) at (prev + 6, 1) to (start + 0, 19) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 36) - Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 0, 8) to (start + 0, 36) true = c1 false = (c0 - c1) -- Code(Counter(1)) at (prev + 0, 37) to (start + 2, 6) -- Code(Expression(0, Sub)) at (prev + 2, 12) to (start + 2, 6) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 17) +- Code(Counter(1)) at (prev + 0, 18) to (start + 0, 28) +- Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 17) + = (c0 - c1) +- Code(Expression(0, Sub)) at (prev + 0, 18) to (start + 0, 29) = (c0 - c1) -- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2) +- Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2) Highest counter ID seen: c1 Function name: generics::print_size:: -Raw bytes (38): 0x[01, 01, 01, 01, 05, 06, 01, 06, 01, 00, 13, 01, 01, 08, 00, 24, 20, 05, 02, 00, 08, 00, 24, 05, 00, 25, 02, 06, 02, 02, 0c, 02, 06, 01, 03, 01, 00, 02] +Raw bytes (48): 0x[01, 01, 01, 01, 05, 08, 01, 06, 01, 00, 13, 01, 01, 08, 00, 24, 20, 05, 02, 00, 08, 00, 24, 05, 01, 09, 00, 11, 05, 00, 12, 00, 1c, 02, 02, 09, 00, 11, 02, 00, 12, 00, 1d, 01, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/generics.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 6 +Number of file 0 mappings: 8 - Code(Counter(0)) at (prev + 6, 1) to (start + 0, 19) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 36) - Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 0, 8) to (start + 0, 36) true = c1 false = (c0 - c1) -- Code(Counter(1)) at (prev + 0, 37) to (start + 2, 6) -- Code(Expression(0, Sub)) at (prev + 2, 12) to (start + 2, 6) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 17) +- Code(Counter(1)) at (prev + 0, 18) to (start + 0, 28) +- Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 17) + = (c0 - c1) +- Code(Expression(0, Sub)) at (prev + 0, 18) to (start + 0, 29) = (c0 - c1) -- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2) +- Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2) Highest counter ID seen: c1 diff --git a/tests/coverage/branch/generics.coverage b/tests/coverage/branch/generics.coverage index 85f73d45f65e0..9aefb2542600c 100644 --- a/tests/coverage/branch/generics.coverage +++ b/tests/coverage/branch/generics.coverage @@ -11,9 +11,9 @@ | Branch (LL:8): [True: 1, False: 0] ------------------ LL| 1| println!("size > 4"); - LL| 2| } else { + LL| | } else { LL| 2| println!("size <= 4"); - LL| 2| } + LL| | } LL| 3|} ------------------ | generics::print_size::<()>: @@ -23,9 +23,9 @@ | | Branch (LL:8): [True: 0, False: 1] | ------------------ | LL| 0| println!("size > 4"); - | LL| 1| } else { + | LL| | } else { | LL| 1| println!("size <= 4"); - | LL| 1| } + | LL| | } | LL| 1|} ------------------ | generics::print_size::: @@ -35,9 +35,9 @@ | | Branch (LL:8): [True: 0, False: 1] | ------------------ | LL| 0| println!("size > 4"); - | LL| 1| } else { + | LL| | } else { | LL| 1| println!("size <= 4"); - | LL| 1| } + | LL| | } | LL| 1|} ------------------ | generics::print_size::: @@ -47,9 +47,9 @@ | | Branch (LL:8): [True: 1, False: 0] | ------------------ | LL| 1| println!("size > 4"); - | LL| 1| } else { + | LL| | } else { | LL| 0| println!("size <= 4"); - | LL| 0| } + | LL| | } | LL| 1|} ------------------ LL| | diff --git a/tests/coverage/branch/guard.cov-map b/tests/coverage/branch/guard.cov-map index 9c6a9bf40fd17..659d82407f5c3 100644 --- a/tests/coverage/branch/guard.cov-map +++ b/tests/coverage/branch/guard.cov-map @@ -1,40 +1,46 @@ Function name: guard::branch_match_guard -Raw bytes (104): 0x[01, 01, 08, 05, 0d, 09, 05, 05, 0f, 0d, 11, 17, 1b, 01, 05, 1f, 11, 09, 0d, 10, 01, 0c, 01, 00, 26, 01, 01, 05, 00, 0e, 02, 02, 0b, 00, 0c, 06, 01, 14, 02, 0a, 0d, 03, 0e, 00, 0f, 05, 00, 14, 00, 19, 20, 0d, 02, 00, 14, 00, 1e, 0d, 00, 1d, 00, 1e, 0d, 00, 22, 02, 0a, 11, 03, 0e, 00, 0f, 02, 00, 14, 00, 19, 20, 11, 0a, 00, 14, 00, 1e, 11, 00, 1d, 00, 1e, 11, 00, 22, 02, 0a, 12, 03, 0e, 02, 0a, 01, 04, 01, 00, 02] +Raw bytes (114): 0x[01, 01, 0d, 09, 05, 05, 0d, 05, 0d, 05, 13, 0d, 11, 2b, 2f, 01, 05, 33, 11, 09, 0d, 2b, 2f, 01, 05, 33, 11, 09, 0d, 10, 01, 0c, 01, 00, 26, 01, 01, 05, 00, 0e, 01, 02, 0b, 00, 0c, 02, 02, 0d, 00, 15, 02, 00, 16, 00, 1c, 05, 02, 14, 00, 1e, 20, 0d, 0a, 00, 14, 00, 1e, 0d, 01, 0d, 00, 15, 0d, 00, 16, 00, 2b, 0a, 02, 14, 00, 1e, 20, 11, 0e, 00, 14, 00, 1e, 11, 01, 0d, 00, 15, 11, 00, 16, 00, 3e, 26, 03, 0d, 00, 15, 26, 00, 16, 00, 26, 01, 03, 01, 00, 02] Number of files: 1 - file 0 => $DIR/guard.rs -Number of expressions: 8 -- expression 0 operands: lhs = Counter(1), rhs = Counter(3) -- expression 1 operands: lhs = Counter(2), rhs = Counter(1) -- expression 2 operands: lhs = Counter(1), rhs = Expression(3, Add) -- expression 3 operands: lhs = Counter(3), rhs = Counter(4) -- expression 4 operands: lhs = Expression(5, Add), rhs = Expression(6, Add) -- expression 5 operands: lhs = Counter(0), rhs = Counter(1) -- expression 6 operands: lhs = Expression(7, Add), rhs = Counter(4) -- expression 7 operands: lhs = Counter(2), rhs = Counter(3) +Number of expressions: 13 +- expression 0 operands: lhs = Counter(2), rhs = Counter(1) +- expression 1 operands: lhs = Counter(1), rhs = Counter(3) +- expression 2 operands: lhs = Counter(1), rhs = Counter(3) +- expression 3 operands: lhs = Counter(1), rhs = Expression(4, Add) +- expression 4 operands: lhs = Counter(3), rhs = Counter(4) +- expression 5 operands: lhs = Expression(10, Add), rhs = Expression(11, Add) +- expression 6 operands: lhs = Counter(0), rhs = Counter(1) +- expression 7 operands: lhs = Expression(12, Add), rhs = Counter(4) +- expression 8 operands: lhs = Counter(2), rhs = Counter(3) +- expression 9 operands: lhs = Expression(10, Add), rhs = Expression(11, Add) +- expression 10 operands: lhs = Counter(0), rhs = Counter(1) +- expression 11 operands: lhs = Expression(12, Add), rhs = Counter(4) +- expression 12 operands: lhs = Counter(2), rhs = Counter(3) Number of file 0 mappings: 16 - Code(Counter(0)) at (prev + 12, 1) to (start + 0, 38) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) -- Code(Expression(0, Sub)) at (prev + 2, 11) to (start + 0, 12) - = (c1 - c3) -- Code(Expression(1, Sub)) at (prev + 1, 20) to (start + 2, 10) +- Code(Counter(0)) at (prev + 2, 11) to (start + 0, 12) +- Code(Expression(0, Sub)) at (prev + 2, 13) to (start + 0, 21) + = (c2 - c1) +- Code(Expression(0, Sub)) at (prev + 0, 22) to (start + 0, 28) = (c2 - c1) -- Code(Counter(3)) at (prev + 3, 14) to (start + 0, 15) -- Code(Counter(1)) at (prev + 0, 20) to (start + 0, 25) -- Branch { true: Counter(3), false: Expression(0, Sub) } at (prev + 0, 20) to (start + 0, 30) +- Code(Counter(1)) at (prev + 2, 20) to (start + 0, 30) +- Branch { true: Counter(3), false: Expression(2, Sub) } at (prev + 0, 20) to (start + 0, 30) true = c3 false = (c1 - c3) -- Code(Counter(3)) at (prev + 0, 29) to (start + 0, 30) -- Code(Counter(3)) at (prev + 0, 34) to (start + 2, 10) -- Code(Counter(4)) at (prev + 3, 14) to (start + 0, 15) -- Code(Expression(0, Sub)) at (prev + 0, 20) to (start + 0, 25) +- Code(Counter(3)) at (prev + 1, 13) to (start + 0, 21) +- Code(Counter(3)) at (prev + 0, 22) to (start + 0, 43) +- Code(Expression(2, Sub)) at (prev + 2, 20) to (start + 0, 30) = (c1 - c3) -- Branch { true: Counter(4), false: Expression(2, Sub) } at (prev + 0, 20) to (start + 0, 30) +- Branch { true: Counter(4), false: Expression(3, Sub) } at (prev + 0, 20) to (start + 0, 30) true = c4 false = (c1 - (c3 + c4)) -- Code(Counter(4)) at (prev + 0, 29) to (start + 0, 30) -- Code(Counter(4)) at (prev + 0, 34) to (start + 2, 10) -- Code(Expression(4, Sub)) at (prev + 3, 14) to (start + 2, 10) +- Code(Counter(4)) at (prev + 1, 13) to (start + 0, 21) +- Code(Counter(4)) at (prev + 0, 22) to (start + 0, 62) +- Code(Expression(9, Sub)) at (prev + 3, 13) to (start + 0, 21) + = ((c0 + c1) - ((c2 + c3) + c4)) +- Code(Expression(9, Sub)) at (prev + 0, 22) to (start + 0, 38) = ((c0 + c1) - ((c2 + c3) + c4)) -- Code(Counter(0)) at (prev + 4, 1) to (start + 0, 2) +- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2) Highest counter ID seen: c4 diff --git a/tests/coverage/branch/guard.coverage b/tests/coverage/branch/guard.coverage index 465aefbf0665e..2754f014105fa 100644 --- a/tests/coverage/branch/guard.coverage +++ b/tests/coverage/branch/guard.coverage @@ -12,26 +12,25 @@ LL| 4|fn branch_match_guard(x: Option) { LL| 4| no_merge!(); LL| | - LL| 1| match x { - LL| 1| Some(0) => { + LL| 4| match x { + LL| | Some(0) => { LL| 1| println!("zero"); - LL| 1| } + LL| | } LL| 3| Some(x) if x % 2 == 0 => { - ^2 ^2 ------------------ | Branch (LL:20): [True: 2, False: 1] ------------------ LL| 2| println!("is nonzero and even"); - LL| 2| } + LL| | } LL| 1| Some(x) if x % 3 == 0 => { ------------------ | Branch (LL:20): [True: 1, False: 0] ------------------ LL| 1| println!("is nonzero and odd, but divisible by 3"); - LL| 1| } - LL| 0| _ => { + LL| | } + LL| | _ => { LL| 0| println!("something else"); - LL| 0| } + LL| | } LL| | } LL| 4|} LL| | diff --git a/tests/coverage/branch/if-let.cov-map b/tests/coverage/branch/if-let.cov-map index 86bfcadb1255a..6d6f3a6e3432b 100644 --- a/tests/coverage/branch/if-let.cov-map +++ b/tests/coverage/branch/if-let.cov-map @@ -1,68 +1,54 @@ Function name: if_let::if_let -Raw bytes (58): 0x[01, 01, 01, 01, 05, 0a, 01, 0c, 01, 00, 1f, 01, 01, 05, 00, 0e, 20, 02, 05, 02, 0c, 00, 13, 02, 00, 11, 00, 12, 01, 00, 16, 00, 1b, 02, 00, 1c, 02, 06, 05, 02, 0c, 02, 06, 01, 03, 05, 00, 08, 01, 00, 09, 00, 0f, 01, 01, 01, 00, 02] +Raw bytes (48): 0x[01, 01, 01, 01, 05, 08, 01, 0c, 01, 00, 1f, 01, 01, 05, 00, 0e, 01, 02, 08, 00, 1b, 20, 02, 05, 00, 0c, 00, 13, 02, 01, 09, 00, 0f, 05, 02, 09, 00, 14, 01, 02, 05, 00, 10, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/if-let.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 10 +Number of file 0 mappings: 8 - Code(Counter(0)) at (prev + 12, 1) to (start + 0, 31) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) -- Branch { true: Expression(0, Sub), false: Counter(1) } at (prev + 2, 12) to (start + 0, 19) +- Code(Counter(0)) at (prev + 2, 8) to (start + 0, 27) +- Branch { true: Expression(0, Sub), false: Counter(1) } at (prev + 0, 12) to (start + 0, 19) true = (c0 - c1) false = c1 -- Code(Expression(0, Sub)) at (prev + 0, 17) to (start + 0, 18) - = (c0 - c1) -- Code(Counter(0)) at (prev + 0, 22) to (start + 0, 27) -- Code(Expression(0, Sub)) at (prev + 0, 28) to (start + 2, 6) +- Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 15) = (c0 - c1) -- Code(Counter(1)) at (prev + 2, 12) to (start + 2, 6) -- Code(Counter(0)) at (prev + 3, 5) to (start + 0, 8) -- Code(Counter(0)) at (prev + 0, 9) to (start + 0, 15) +- Code(Counter(1)) at (prev + 2, 9) to (start + 0, 20) +- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 16) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c1 Function name: if_let::if_let_chain -Raw bytes (102): 0x[01, 01, 0c, 01, 05, 01, 2f, 05, 09, 01, 2f, 05, 09, 01, 2f, 05, 09, 01, 2f, 05, 09, 01, 2f, 05, 09, 05, 09, 0e, 01, 17, 01, 00, 32, 20, 02, 05, 01, 0c, 00, 13, 02, 00, 11, 00, 12, 01, 00, 16, 00, 17, 20, 26, 09, 01, 10, 00, 17, 26, 00, 15, 00, 16, 02, 00, 1a, 00, 1b, 26, 01, 05, 03, 06, 26, 01, 09, 00, 0c, 26, 00, 0d, 00, 0e, 2f, 02, 0c, 02, 06, 01, 03, 05, 00, 08, 01, 00, 09, 00, 0f, 01, 01, 01, 00, 02] +Raw bytes (74): 0x[01, 01, 08, 01, 05, 01, 1f, 05, 09, 01, 1f, 05, 09, 01, 1f, 05, 09, 05, 09, 0a, 01, 17, 01, 00, 32, 01, 01, 08, 00, 17, 20, 02, 05, 00, 0c, 00, 13, 02, 01, 0c, 00, 1b, 20, 16, 09, 00, 10, 00, 17, 16, 02, 09, 00, 0f, 16, 01, 09, 00, 0f, 1f, 02, 09, 00, 18, 01, 02, 05, 00, 10, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/if-let.rs -Number of expressions: 12 +Number of expressions: 8 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -- expression 1 operands: lhs = Counter(0), rhs = Expression(11, Add) +- expression 1 operands: lhs = Counter(0), rhs = Expression(7, Add) - expression 2 operands: lhs = Counter(1), rhs = Counter(2) -- expression 3 operands: lhs = Counter(0), rhs = Expression(11, Add) +- expression 3 operands: lhs = Counter(0), rhs = Expression(7, Add) - expression 4 operands: lhs = Counter(1), rhs = Counter(2) -- expression 5 operands: lhs = Counter(0), rhs = Expression(11, Add) +- expression 5 operands: lhs = Counter(0), rhs = Expression(7, Add) - expression 6 operands: lhs = Counter(1), rhs = Counter(2) -- expression 7 operands: lhs = Counter(0), rhs = Expression(11, Add) -- expression 8 operands: lhs = Counter(1), rhs = Counter(2) -- expression 9 operands: lhs = Counter(0), rhs = Expression(11, Add) -- expression 10 operands: lhs = Counter(1), rhs = Counter(2) -- expression 11 operands: lhs = Counter(1), rhs = Counter(2) -Number of file 0 mappings: 14 +- expression 7 operands: lhs = Counter(1), rhs = Counter(2) +Number of file 0 mappings: 10 - Code(Counter(0)) at (prev + 23, 1) to (start + 0, 50) -- Branch { true: Expression(0, Sub), false: Counter(1) } at (prev + 1, 12) to (start + 0, 19) +- Code(Counter(0)) at (prev + 1, 8) to (start + 0, 23) +- Branch { true: Expression(0, Sub), false: Counter(1) } at (prev + 0, 12) to (start + 0, 19) true = (c0 - c1) false = c1 -- Code(Expression(0, Sub)) at (prev + 0, 17) to (start + 0, 18) +- Code(Expression(0, Sub)) at (prev + 1, 12) to (start + 0, 27) = (c0 - c1) -- Code(Counter(0)) at (prev + 0, 22) to (start + 0, 23) -- Branch { true: Expression(9, Sub), false: Counter(2) } at (prev + 1, 16) to (start + 0, 23) +- Branch { true: Expression(5, Sub), false: Counter(2) } at (prev + 0, 16) to (start + 0, 23) true = (c0 - (c1 + c2)) false = c2 -- Code(Expression(9, Sub)) at (prev + 0, 21) to (start + 0, 22) - = (c0 - (c1 + c2)) -- Code(Expression(0, Sub)) at (prev + 0, 26) to (start + 0, 27) - = (c0 - c1) -- Code(Expression(9, Sub)) at (prev + 1, 5) to (start + 3, 6) - = (c0 - (c1 + c2)) -- Code(Expression(9, Sub)) at (prev + 1, 9) to (start + 0, 12) +- Code(Expression(5, Sub)) at (prev + 2, 9) to (start + 0, 15) = (c0 - (c1 + c2)) -- Code(Expression(9, Sub)) at (prev + 0, 13) to (start + 0, 14) +- Code(Expression(5, Sub)) at (prev + 1, 9) to (start + 0, 15) = (c0 - (c1 + c2)) -- Code(Expression(11, Add)) at (prev + 2, 12) to (start + 2, 6) +- Code(Expression(7, Add)) at (prev + 2, 9) to (start + 0, 24) = (c1 + c2) -- Code(Counter(0)) at (prev + 3, 5) to (start + 0, 8) -- Code(Counter(0)) at (prev + 0, 9) to (start + 0, 15) +- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 16) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c2 diff --git a/tests/coverage/branch/if-let.coverage b/tests/coverage/branch/if-let.coverage index e55da7fb7260c..6b086d43e565a 100644 --- a/tests/coverage/branch/if-let.coverage +++ b/tests/coverage/branch/if-let.coverage @@ -13,34 +13,31 @@ LL| 3| no_merge!(); LL| | LL| 3| if let Some(x) = input { - ^2 ------------------ | Branch (LL:12): [True: 2, False: 1] ------------------ LL| 2| say(x); - LL| 2| } else { + LL| | } else { LL| 1| say("none"); - LL| 1| } + LL| | } LL| 3| say("done"); LL| 3|} LL| | LL| 15|fn if_let_chain(a: Option<&str>, b: Option<&str>) { LL| 15| if let Some(x) = a - ^12 ------------------ | Branch (LL:12): [True: 12, False: 3] ------------------ LL| 12| && let Some(y) = b - ^8 ------------------ | Branch (LL:16): [True: 8, False: 4] ------------------ - LL| 8| { + LL| | { LL| 8| say(x); LL| 8| say(y); - LL| 8| } else { + LL| | } else { LL| 7| say("not both"); - LL| 7| } + LL| | } LL| 15| say("done"); LL| 15|} LL| | diff --git a/tests/coverage/branch/if.cov-map b/tests/coverage/branch/if.cov-map index 09a014ce8a1aa..eeb059e3a4c63 100644 --- a/tests/coverage/branch/if.cov-map +++ b/tests/coverage/branch/if.cov-map @@ -1,5 +1,5 @@ Function name: if::branch_and -Raw bytes (59): 0x[01, 01, 03, 01, 05, 05, 09, 01, 09, 09, 01, 2b, 01, 00, 20, 01, 01, 05, 00, 0e, 01, 02, 08, 00, 09, 20, 05, 02, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 20, 09, 06, 00, 0d, 00, 0e, 09, 00, 0f, 02, 06, 0a, 02, 0c, 02, 06, 01, 03, 01, 00, 02] +Raw bytes (59): 0x[01, 01, 03, 01, 05, 05, 09, 01, 09, 09, 01, 2b, 01, 00, 20, 01, 01, 05, 00, 0e, 01, 02, 08, 00, 09, 20, 05, 02, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 20, 09, 06, 00, 0d, 00, 0e, 09, 01, 09, 00, 14, 0a, 02, 09, 00, 18, 01, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/if.rs Number of expressions: 3 @@ -17,14 +17,14 @@ Number of file 0 mappings: 9 - Branch { true: Counter(2), false: Expression(1, Sub) } at (prev + 0, 13) to (start + 0, 14) true = c2 false = (c1 - c2) -- Code(Counter(2)) at (prev + 0, 15) to (start + 2, 6) -- Code(Expression(2, Sub)) at (prev + 2, 12) to (start + 2, 6) +- Code(Counter(2)) at (prev + 1, 9) to (start + 0, 20) +- Code(Expression(2, Sub)) at (prev + 2, 9) to (start + 0, 24) = (c0 - c2) -- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2) +- Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2) Highest counter ID seen: c2 Function name: if::branch_not -Raw bytes (126): 0x[01, 01, 07, 01, 05, 01, 09, 01, 09, 01, 0d, 01, 0d, 01, 11, 01, 11, 14, 01, 0c, 01, 00, 17, 01, 01, 05, 00, 0e, 01, 02, 08, 00, 09, 20, 05, 02, 00, 08, 00, 09, 05, 01, 09, 00, 0c, 05, 00, 0d, 00, 10, 02, 01, 05, 00, 06, 01, 01, 08, 00, 0a, 20, 0a, 09, 00, 08, 00, 0a, 0a, 00, 0b, 02, 06, 09, 02, 05, 00, 06, 01, 01, 08, 00, 0b, 20, 0d, 12, 00, 08, 00, 0b, 0d, 00, 0c, 02, 06, 12, 02, 05, 00, 06, 01, 01, 08, 00, 0c, 20, 1a, 11, 00, 08, 00, 0c, 1a, 00, 0d, 02, 06, 11, 02, 05, 00, 06, 01, 01, 01, 00, 02] +Raw bytes (121): 0x[01, 01, 07, 01, 05, 01, 09, 01, 09, 01, 0d, 01, 0d, 01, 11, 01, 11, 13, 01, 0c, 01, 00, 17, 01, 01, 05, 00, 0e, 01, 02, 08, 00, 09, 20, 05, 02, 00, 08, 00, 09, 05, 01, 09, 00, 11, 02, 01, 05, 00, 06, 01, 01, 08, 00, 0a, 20, 0a, 09, 00, 08, 00, 0a, 0a, 01, 09, 00, 15, 09, 01, 05, 00, 06, 01, 01, 08, 00, 0b, 20, 0d, 12, 00, 08, 00, 0b, 0d, 01, 09, 00, 19, 12, 01, 05, 00, 06, 01, 01, 08, 00, 0c, 20, 1a, 11, 00, 08, 00, 0c, 1a, 01, 09, 00, 1d, 11, 01, 05, 00, 06, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/if.rs Number of expressions: 7 @@ -35,43 +35,42 @@ Number of expressions: 7 - expression 4 operands: lhs = Counter(0), rhs = Counter(3) - expression 5 operands: lhs = Counter(0), rhs = Counter(4) - expression 6 operands: lhs = Counter(0), rhs = Counter(4) -Number of file 0 mappings: 20 +Number of file 0 mappings: 19 - Code(Counter(0)) at (prev + 12, 1) to (start + 0, 23) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) - Code(Counter(0)) at (prev + 2, 8) to (start + 0, 9) - Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 0, 8) to (start + 0, 9) true = c1 false = (c0 - c1) -- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 12) -- Code(Counter(1)) at (prev + 0, 13) to (start + 0, 16) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 17) - Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 6) = (c0 - c1) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 10) - Branch { true: Expression(2, Sub), false: Counter(2) } at (prev + 0, 8) to (start + 0, 10) true = (c0 - c2) false = c2 -- Code(Expression(2, Sub)) at (prev + 0, 11) to (start + 2, 6) +- Code(Expression(2, Sub)) at (prev + 1, 9) to (start + 0, 21) = (c0 - c2) -- Code(Counter(2)) at (prev + 2, 5) to (start + 0, 6) +- Code(Counter(2)) at (prev + 1, 5) to (start + 0, 6) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 11) - Branch { true: Counter(3), false: Expression(4, Sub) } at (prev + 0, 8) to (start + 0, 11) true = c3 false = (c0 - c3) -- Code(Counter(3)) at (prev + 0, 12) to (start + 2, 6) -- Code(Expression(4, Sub)) at (prev + 2, 5) to (start + 0, 6) +- Code(Counter(3)) at (prev + 1, 9) to (start + 0, 25) +- Code(Expression(4, Sub)) at (prev + 1, 5) to (start + 0, 6) = (c0 - c3) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 12) - Branch { true: Expression(6, Sub), false: Counter(4) } at (prev + 0, 8) to (start + 0, 12) true = (c0 - c4) false = c4 -- Code(Expression(6, Sub)) at (prev + 0, 13) to (start + 2, 6) +- Code(Expression(6, Sub)) at (prev + 1, 9) to (start + 0, 29) = (c0 - c4) -- Code(Counter(4)) at (prev + 2, 5) to (start + 0, 6) +- Code(Counter(4)) at (prev + 1, 5) to (start + 0, 6) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c4 Function name: if::branch_not_as -Raw bytes (95): 0x[01, 01, 05, 01, 05, 01, 09, 01, 09, 01, 0d, 01, 0d, 0f, 01, 1d, 01, 00, 1a, 01, 01, 05, 00, 0e, 01, 02, 08, 00, 14, 20, 02, 05, 00, 08, 00, 14, 02, 00, 15, 02, 06, 05, 02, 05, 00, 06, 01, 01, 08, 00, 15, 20, 09, 0a, 00, 08, 00, 15, 09, 00, 16, 02, 06, 0a, 02, 05, 00, 06, 01, 01, 08, 00, 16, 20, 12, 0d, 00, 08, 00, 16, 12, 00, 17, 02, 06, 0d, 02, 05, 00, 06, 01, 01, 01, 00, 02] +Raw bytes (95): 0x[01, 01, 05, 01, 05, 01, 09, 01, 09, 01, 0d, 01, 0d, 0f, 01, 1d, 01, 00, 1a, 01, 01, 05, 00, 0e, 01, 02, 08, 00, 14, 20, 02, 05, 00, 08, 00, 14, 02, 01, 09, 00, 1f, 05, 01, 05, 00, 06, 01, 01, 08, 00, 15, 20, 09, 0a, 00, 08, 00, 15, 09, 01, 09, 00, 23, 0a, 01, 05, 00, 06, 01, 01, 08, 00, 16, 20, 12, 0d, 00, 08, 00, 16, 12, 01, 09, 00, 23, 0d, 01, 05, 00, 06, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/if.rs Number of expressions: 5 @@ -87,28 +86,28 @@ Number of file 0 mappings: 15 - Branch { true: Expression(0, Sub), false: Counter(1) } at (prev + 0, 8) to (start + 0, 20) true = (c0 - c1) false = c1 -- Code(Expression(0, Sub)) at (prev + 0, 21) to (start + 2, 6) +- Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 31) = (c0 - c1) -- Code(Counter(1)) at (prev + 2, 5) to (start + 0, 6) +- Code(Counter(1)) at (prev + 1, 5) to (start + 0, 6) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 21) - Branch { true: Counter(2), false: Expression(2, Sub) } at (prev + 0, 8) to (start + 0, 21) true = c2 false = (c0 - c2) -- Code(Counter(2)) at (prev + 0, 22) to (start + 2, 6) -- Code(Expression(2, Sub)) at (prev + 2, 5) to (start + 0, 6) +- Code(Counter(2)) at (prev + 1, 9) to (start + 0, 35) +- Code(Expression(2, Sub)) at (prev + 1, 5) to (start + 0, 6) = (c0 - c2) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 22) - Branch { true: Expression(4, Sub), false: Counter(3) } at (prev + 0, 8) to (start + 0, 22) true = (c0 - c3) false = c3 -- Code(Expression(4, Sub)) at (prev + 0, 23) to (start + 2, 6) +- Code(Expression(4, Sub)) at (prev + 1, 9) to (start + 0, 35) = (c0 - c3) -- Code(Counter(3)) at (prev + 2, 5) to (start + 0, 6) +- Code(Counter(3)) at (prev + 1, 5) to (start + 0, 6) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c3 Function name: if::branch_or -Raw bytes (65): 0x[01, 01, 06, 01, 05, 01, 17, 05, 09, 05, 09, 01, 17, 05, 09, 09, 01, 35, 01, 00, 1f, 01, 01, 05, 00, 0e, 01, 02, 08, 00, 09, 20, 05, 02, 00, 08, 00, 09, 02, 00, 0d, 00, 0e, 20, 09, 12, 00, 0d, 00, 0e, 17, 00, 0f, 02, 06, 12, 02, 0c, 02, 06, 01, 03, 01, 00, 02] +Raw bytes (65): 0x[01, 01, 06, 01, 05, 01, 17, 05, 09, 05, 09, 01, 17, 05, 09, 09, 01, 35, 01, 00, 1f, 01, 01, 05, 00, 0e, 01, 02, 08, 00, 09, 20, 05, 02, 00, 08, 00, 09, 02, 00, 0d, 00, 0e, 20, 09, 12, 00, 0d, 00, 0e, 17, 01, 09, 00, 16, 12, 02, 09, 00, 17, 01, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/if.rs Number of expressions: 6 @@ -130,10 +129,10 @@ Number of file 0 mappings: 9 - Branch { true: Counter(2), false: Expression(4, Sub) } at (prev + 0, 13) to (start + 0, 14) true = c2 false = (c0 - (c1 + c2)) -- Code(Expression(5, Add)) at (prev + 0, 15) to (start + 2, 6) +- Code(Expression(5, Add)) at (prev + 1, 9) to (start + 0, 22) = (c1 + c2) -- Code(Expression(4, Sub)) at (prev + 2, 12) to (start + 2, 6) +- Code(Expression(4, Sub)) at (prev + 2, 9) to (start + 0, 23) = (c0 - (c1 + c2)) -- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2) +- Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2) Highest counter ID seen: c2 diff --git a/tests/coverage/branch/if.coverage b/tests/coverage/branch/if.coverage index 3d107188ca682..976483873a888 100644 --- a/tests/coverage/branch/if.coverage +++ b/tests/coverage/branch/if.coverage @@ -29,8 +29,7 @@ | Branch (LL:8): [True: 2, False: 1] ------------------ LL| 2| say("not not a"); - LL| 2| } - ^1 + LL| 1| } LL| 3| if !!!a { ------------------ | Branch (LL:8): [True: 1, False: 2] @@ -53,8 +52,7 @@ | Branch (LL:8): [True: 2, False: 1] ------------------ LL| 2| say("not not (a as bool)"); - LL| 2| } - ^1 + LL| 1| } LL| 3| if !!!(a as bool) { ------------------ | Branch (LL:8): [True: 1, False: 2] @@ -73,9 +71,9 @@ | Branch (LL:13): [True: 8, False: 4] ------------------ LL| 8| say("both"); - LL| 8| } else { + LL| | } else { LL| 7| say("not both"); - LL| 7| } + LL| | } LL| 15|} LL| | LL| 15|fn branch_or(a: bool, b: bool) { @@ -88,9 +86,9 @@ | Branch (LL:13): [True: 2, False: 1] ------------------ LL| 14| say("either"); - LL| 14| } else { + LL| | } else { LL| 1| say("neither"); - LL| 1| } + LL| | } LL| 15|} LL| | LL| |#[coverage(off)] diff --git a/tests/coverage/branch/lazy-boolean.cov-map b/tests/coverage/branch/lazy-boolean.cov-map index 9ec7c9a7f42bd..9a85ed2987afc 100644 --- a/tests/coverage/branch/lazy-boolean.cov-map +++ b/tests/coverage/branch/lazy-boolean.cov-map @@ -1,46 +1,42 @@ Function name: lazy_boolean::branch_and -Raw bytes (53): 0x[01, 01, 01, 01, 05, 09, 01, 13, 01, 00, 20, 01, 01, 05, 00, 0e, 01, 03, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 02, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 01, 01, 05, 00, 0e, 01, 00, 0f, 00, 10, 01, 01, 01, 00, 02] +Raw bytes (43): 0x[01, 01, 01, 01, 05, 07, 01, 13, 01, 00, 20, 01, 01, 05, 00, 0e, 01, 03, 0d, 00, 0e, 20, 05, 02, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 01, 01, 05, 00, 11, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/lazy-boolean.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 9 +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 19, 1) to (start + 0, 32) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 3, 9) to (start + 0, 10) -- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14) +- Code(Counter(0)) at (prev + 3, 13) to (start + 0, 14) - Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 0, 13) to (start + 0, 14) true = c1 false = (c0 - c1) - Code(Counter(1)) at (prev + 0, 18) to (start + 0, 19) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 16) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 17) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c1 Function name: lazy_boolean::branch_or -Raw bytes (53): 0x[01, 01, 01, 01, 05, 09, 01, 1b, 01, 00, 1f, 01, 01, 05, 00, 0e, 01, 03, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 02, 00, 0d, 00, 0e, 02, 00, 12, 00, 13, 01, 01, 05, 00, 0e, 01, 00, 0f, 00, 10, 01, 01, 01, 00, 02] +Raw bytes (43): 0x[01, 01, 01, 01, 05, 07, 01, 1b, 01, 00, 1f, 01, 01, 05, 00, 0e, 01, 03, 0d, 00, 0e, 20, 05, 02, 00, 0d, 00, 0e, 02, 00, 12, 00, 13, 01, 01, 05, 00, 11, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/lazy-boolean.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 9 +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 27, 1) to (start + 0, 31) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 3, 9) to (start + 0, 10) -- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14) +- Code(Counter(0)) at (prev + 3, 13) to (start + 0, 14) - Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 0, 13) to (start + 0, 14) true = c1 false = (c0 - c1) - Code(Expression(0, Sub)) at (prev + 0, 18) to (start + 0, 19) = (c0 - c1) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 16) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 17) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c1 Function name: lazy_boolean::chain -Raw bytes (161): 0x[01, 01, 0f, 01, 05, 05, 09, 09, 0d, 01, 11, 01, 11, 01, 3b, 11, 15, 01, 3b, 11, 15, 01, 37, 3b, 19, 11, 15, 01, 37, 3b, 19, 11, 15, 17, 01, 24, 01, 00, 11, 01, 01, 05, 00, 0e, 01, 03, 09, 00, 0a, 01, 00, 0d, 00, 12, 20, 05, 02, 00, 0d, 00, 12, 05, 00, 16, 00, 1b, 20, 09, 06, 00, 16, 00, 1b, 09, 00, 1f, 00, 24, 20, 0d, 0a, 00, 1f, 00, 24, 0d, 00, 28, 00, 2d, 01, 01, 05, 00, 0e, 01, 00, 0f, 00, 10, 01, 03, 09, 00, 0a, 01, 00, 0d, 00, 12, 20, 11, 12, 00, 0d, 00, 12, 12, 00, 16, 00, 1b, 20, 15, 1e, 00, 16, 00, 1b, 1e, 00, 1f, 00, 24, 20, 19, 32, 00, 1f, 00, 24, 32, 00, 28, 00, 2d, 01, 01, 05, 00, 0e, 01, 00, 0f, 00, 10, 01, 01, 01, 00, 02] +Raw bytes (141): 0x[01, 01, 0f, 01, 05, 05, 09, 09, 0d, 01, 11, 01, 11, 01, 3b, 11, 15, 01, 3b, 11, 15, 01, 37, 3b, 19, 11, 15, 01, 37, 3b, 19, 11, 15, 13, 01, 24, 01, 00, 11, 01, 01, 05, 00, 0e, 01, 03, 0d, 00, 12, 20, 05, 02, 00, 0d, 00, 12, 05, 00, 16, 00, 1b, 20, 09, 06, 00, 16, 00, 1b, 09, 00, 1f, 00, 24, 20, 0d, 0a, 00, 1f, 00, 24, 0d, 00, 28, 00, 2d, 01, 01, 05, 00, 11, 01, 03, 0d, 00, 12, 20, 11, 12, 00, 0d, 00, 12, 12, 00, 16, 00, 1b, 20, 15, 1e, 00, 16, 00, 1b, 1e, 00, 1f, 00, 24, 20, 19, 32, 00, 1f, 00, 24, 32, 00, 28, 00, 2d, 01, 01, 05, 00, 11, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/lazy-boolean.rs Number of expressions: 15 @@ -59,11 +55,10 @@ Number of expressions: 15 - expression 12 operands: lhs = Counter(0), rhs = Expression(13, Add) - expression 13 operands: lhs = Expression(14, Add), rhs = Counter(6) - expression 14 operands: lhs = Counter(4), rhs = Counter(5) -Number of file 0 mappings: 23 +Number of file 0 mappings: 19 - Code(Counter(0)) at (prev + 36, 1) to (start + 0, 17) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 3, 9) to (start + 0, 10) -- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 18) +- Code(Counter(0)) at (prev + 3, 13) to (start + 0, 18) - Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 0, 13) to (start + 0, 18) true = c1 false = (c0 - c1) @@ -76,10 +71,8 @@ Number of file 0 mappings: 23 true = c3 false = (c2 - c3) - Code(Counter(3)) at (prev + 0, 40) to (start + 0, 45) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 16) -- Code(Counter(0)) at (prev + 3, 9) to (start + 0, 10) -- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 18) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 17) +- Code(Counter(0)) at (prev + 3, 13) to (start + 0, 18) - Branch { true: Counter(4), false: Expression(4, Sub) } at (prev + 0, 13) to (start + 0, 18) true = c4 false = (c0 - c4) @@ -95,13 +88,12 @@ Number of file 0 mappings: 23 false = (c0 - ((c4 + c5) + c6)) - Code(Expression(12, Sub)) at (prev + 0, 40) to (start + 0, 45) = (c0 - ((c4 + c5) + c6)) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 16) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 17) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c6 Function name: lazy_boolean::nested_mixed -Raw bytes (157): 0x[01, 01, 0d, 01, 05, 01, 1f, 05, 09, 05, 09, 1f, 0d, 05, 09, 1f, 0d, 05, 09, 01, 11, 11, 15, 01, 15, 01, 33, 15, 19, 17, 01, 31, 01, 00, 18, 01, 01, 05, 00, 0e, 01, 03, 09, 00, 0a, 01, 00, 0e, 00, 13, 20, 05, 02, 00, 0e, 00, 13, 02, 00, 17, 00, 1d, 20, 09, 06, 00, 17, 00, 1d, 1f, 00, 23, 00, 28, 20, 0d, 1a, 00, 23, 00, 28, 1a, 00, 2c, 00, 33, 01, 01, 05, 00, 0e, 01, 00, 0f, 00, 10, 01, 03, 09, 00, 0a, 01, 00, 0e, 00, 13, 20, 11, 22, 00, 0e, 00, 13, 11, 00, 17, 00, 1c, 20, 15, 26, 00, 17, 00, 1c, 2a, 00, 22, 00, 28, 20, 19, 2e, 00, 22, 00, 28, 19, 00, 2c, 00, 33, 01, 01, 05, 00, 0e, 01, 00, 0f, 00, 10, 01, 01, 01, 00, 02] +Raw bytes (137): 0x[01, 01, 0d, 01, 05, 01, 1f, 05, 09, 05, 09, 1f, 0d, 05, 09, 1f, 0d, 05, 09, 01, 11, 11, 15, 01, 15, 01, 33, 15, 19, 13, 01, 31, 01, 00, 18, 01, 01, 05, 00, 0e, 01, 03, 0e, 00, 13, 20, 05, 02, 00, 0e, 00, 13, 02, 00, 17, 00, 1d, 20, 09, 06, 00, 17, 00, 1d, 1f, 00, 23, 00, 28, 20, 0d, 1a, 00, 23, 00, 28, 1a, 00, 2c, 00, 33, 01, 01, 05, 00, 11, 01, 03, 0e, 00, 13, 20, 11, 22, 00, 0e, 00, 13, 11, 00, 17, 00, 1c, 20, 15, 26, 00, 17, 00, 1c, 2a, 00, 22, 00, 28, 20, 19, 2e, 00, 22, 00, 28, 19, 00, 2c, 00, 33, 01, 01, 05, 00, 11, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/lazy-boolean.rs Number of expressions: 13 @@ -118,11 +110,10 @@ Number of expressions: 13 - expression 10 operands: lhs = Counter(0), rhs = Counter(5) - expression 11 operands: lhs = Counter(0), rhs = Expression(12, Add) - expression 12 operands: lhs = Counter(5), rhs = Counter(6) -Number of file 0 mappings: 23 +Number of file 0 mappings: 19 - Code(Counter(0)) at (prev + 49, 1) to (start + 0, 24) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 3, 9) to (start + 0, 10) -- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 19) +- Code(Counter(0)) at (prev + 3, 14) to (start + 0, 19) - Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 0, 14) to (start + 0, 19) true = c1 false = (c0 - c1) @@ -138,10 +129,8 @@ Number of file 0 mappings: 23 false = ((c1 + c2) - c3) - Code(Expression(6, Sub)) at (prev + 0, 44) to (start + 0, 51) = ((c1 + c2) - c3) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 16) -- Code(Counter(0)) at (prev + 3, 9) to (start + 0, 10) -- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 19) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 17) +- Code(Counter(0)) at (prev + 3, 14) to (start + 0, 19) - Branch { true: Counter(4), false: Expression(8, Sub) } at (prev + 0, 14) to (start + 0, 19) true = c4 false = (c0 - c4) @@ -155,8 +144,7 @@ Number of file 0 mappings: 23 true = c6 false = (c0 - (c5 + c6)) - Code(Counter(6)) at (prev + 0, 44) to (start + 0, 51) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 16) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 17) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c6 diff --git a/tests/coverage/branch/let-else.cov-map b/tests/coverage/branch/let-else.cov-map index 61bedbfbff0cd..df5d53acccb46 100644 --- a/tests/coverage/branch/let-else.cov-map +++ b/tests/coverage/branch/let-else.cov-map @@ -1,24 +1,19 @@ Function name: let_else::let_else -Raw bytes (63): 0x[01, 01, 01, 01, 05, 0b, 01, 0c, 01, 00, 21, 01, 01, 05, 00, 0e, 20, 02, 05, 02, 09, 00, 10, 02, 00, 0e, 00, 0f, 01, 00, 13, 00, 18, 05, 01, 09, 00, 0c, 05, 00, 0d, 00, 13, 05, 01, 09, 00, 0f, 02, 03, 05, 00, 08, 02, 00, 09, 00, 0a, 01, 01, 01, 00, 02] +Raw bytes (48): 0x[01, 01, 01, 01, 05, 08, 01, 0c, 01, 00, 21, 01, 01, 05, 00, 0e, 20, 02, 05, 02, 09, 00, 10, 01, 00, 13, 00, 18, 05, 01, 09, 00, 14, 05, 01, 09, 00, 0f, 02, 03, 05, 00, 0b, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/let-else.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 11 +Number of file 0 mappings: 8 - Code(Counter(0)) at (prev + 12, 1) to (start + 0, 33) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) - Branch { true: Expression(0, Sub), false: Counter(1) } at (prev + 2, 9) to (start + 0, 16) true = (c0 - c1) false = c1 -- Code(Expression(0, Sub)) at (prev + 0, 14) to (start + 0, 15) - = (c0 - c1) - Code(Counter(0)) at (prev + 0, 19) to (start + 0, 24) -- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 12) -- Code(Counter(1)) at (prev + 0, 13) to (start + 0, 19) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 20) - Code(Counter(1)) at (prev + 1, 9) to (start + 0, 15) -- Code(Expression(0, Sub)) at (prev + 3, 5) to (start + 0, 8) - = (c0 - c1) -- Code(Expression(0, Sub)) at (prev + 0, 9) to (start + 0, 10) +- Code(Expression(0, Sub)) at (prev + 3, 5) to (start + 0, 11) = (c0 - c1) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c1 diff --git a/tests/coverage/branch/let-else.coverage b/tests/coverage/branch/let-else.coverage index 22ad8f2b0e138..b6aba7cd24b16 100644 --- a/tests/coverage/branch/let-else.coverage +++ b/tests/coverage/branch/let-else.coverage @@ -13,7 +13,6 @@ LL| 3| no_merge!(); LL| | LL| 3| let Some(x) = value else { - ^2 ------------------ | Branch (LL:9): [True: 2, False: 1] ------------------ diff --git a/tests/coverage/branch/match-arms.cov-map b/tests/coverage/branch/match-arms.cov-map index a2ed0d84ed610..8fcf8a612c022 100644 --- a/tests/coverage/branch/match-arms.cov-map +++ b/tests/coverage/branch/match-arms.cov-map @@ -1,5 +1,5 @@ Function name: match_arms::guards -Raw bytes (158): 0x[01, 01, 08, 15, 05, 19, 09, 1d, 0d, 21, 11, 01, 17, 1b, 11, 1f, 0d, 05, 09, 1a, 01, 30, 01, 00, 23, 01, 01, 05, 00, 0e, 21, 02, 0b, 00, 10, 05, 01, 11, 00, 12, 20, 05, 02, 00, 17, 00, 1b, 05, 00, 1a, 00, 1b, 05, 00, 1f, 00, 26, 05, 00, 27, 00, 28, 09, 01, 11, 00, 12, 20, 09, 06, 00, 17, 00, 1b, 09, 00, 1a, 00, 1b, 09, 00, 1f, 00, 26, 09, 00, 27, 00, 28, 0d, 01, 11, 00, 12, 20, 0d, 0a, 00, 17, 00, 1b, 0d, 00, 1a, 00, 1b, 0d, 00, 1f, 00, 26, 0d, 00, 27, 00, 28, 11, 01, 11, 00, 12, 20, 11, 0e, 00, 17, 00, 1b, 11, 00, 1a, 00, 1b, 11, 00, 1f, 00, 26, 11, 00, 27, 00, 28, 12, 01, 0e, 00, 15, 01, 03, 05, 00, 0c, 01, 01, 01, 00, 02] +Raw bytes (118): 0x[01, 01, 08, 15, 05, 19, 09, 1d, 0d, 21, 11, 01, 17, 1b, 11, 1f, 0d, 05, 09, 12, 01, 30, 01, 00, 23, 01, 01, 05, 00, 0e, 01, 02, 0b, 00, 10, 15, 01, 17, 00, 1b, 20, 05, 02, 00, 17, 00, 1b, 05, 00, 1f, 00, 29, 19, 01, 17, 00, 1b, 20, 09, 06, 00, 17, 00, 1b, 09, 00, 1f, 00, 29, 1d, 01, 17, 00, 1b, 20, 0d, 0a, 00, 17, 00, 1b, 0d, 00, 1f, 00, 29, 21, 01, 17, 00, 1b, 20, 11, 0e, 00, 17, 00, 1b, 11, 00, 1f, 00, 29, 12, 01, 0e, 00, 18, 01, 03, 05, 00, 0f, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/match-arms.rs Number of expressions: 8 @@ -11,103 +11,73 @@ Number of expressions: 8 - expression 5 operands: lhs = Expression(6, Add), rhs = Counter(4) - expression 6 operands: lhs = Expression(7, Add), rhs = Counter(3) - expression 7 operands: lhs = Counter(1), rhs = Counter(2) -Number of file 0 mappings: 26 +Number of file 0 mappings: 18 - Code(Counter(0)) at (prev + 48, 1) to (start + 0, 35) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) -- Code(Counter(8)) at (prev + 2, 11) to (start + 0, 16) -- Code(Counter(1)) at (prev + 1, 17) to (start + 0, 18) +- Code(Counter(0)) at (prev + 2, 11) to (start + 0, 16) +- Code(Counter(5)) at (prev + 1, 23) to (start + 0, 27) - Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 0, 23) to (start + 0, 27) true = c1 false = (c5 - c1) -- Code(Counter(1)) at (prev + 0, 26) to (start + 0, 27) -- Code(Counter(1)) at (prev + 0, 31) to (start + 0, 38) -- Code(Counter(1)) at (prev + 0, 39) to (start + 0, 40) -- Code(Counter(2)) at (prev + 1, 17) to (start + 0, 18) +- Code(Counter(1)) at (prev + 0, 31) to (start + 0, 41) +- Code(Counter(6)) at (prev + 1, 23) to (start + 0, 27) - Branch { true: Counter(2), false: Expression(1, Sub) } at (prev + 0, 23) to (start + 0, 27) true = c2 false = (c6 - c2) -- Code(Counter(2)) at (prev + 0, 26) to (start + 0, 27) -- Code(Counter(2)) at (prev + 0, 31) to (start + 0, 38) -- Code(Counter(2)) at (prev + 0, 39) to (start + 0, 40) -- Code(Counter(3)) at (prev + 1, 17) to (start + 0, 18) +- Code(Counter(2)) at (prev + 0, 31) to (start + 0, 41) +- Code(Counter(7)) at (prev + 1, 23) to (start + 0, 27) - Branch { true: Counter(3), false: Expression(2, Sub) } at (prev + 0, 23) to (start + 0, 27) true = c3 false = (c7 - c3) -- Code(Counter(3)) at (prev + 0, 26) to (start + 0, 27) -- Code(Counter(3)) at (prev + 0, 31) to (start + 0, 38) -- Code(Counter(3)) at (prev + 0, 39) to (start + 0, 40) -- Code(Counter(4)) at (prev + 1, 17) to (start + 0, 18) +- Code(Counter(3)) at (prev + 0, 31) to (start + 0, 41) +- Code(Counter(8)) at (prev + 1, 23) to (start + 0, 27) - Branch { true: Counter(4), false: Expression(3, Sub) } at (prev + 0, 23) to (start + 0, 27) true = c4 false = (c8 - c4) -- Code(Counter(4)) at (prev + 0, 26) to (start + 0, 27) -- Code(Counter(4)) at (prev + 0, 31) to (start + 0, 38) -- Code(Counter(4)) at (prev + 0, 39) to (start + 0, 40) -- Code(Expression(4, Sub)) at (prev + 1, 14) to (start + 0, 21) +- Code(Counter(4)) at (prev + 0, 31) to (start + 0, 41) +- Code(Expression(4, Sub)) at (prev + 1, 14) to (start + 0, 24) = (c0 - (((c1 + c2) + c3) + c4)) -- Code(Counter(0)) at (prev + 3, 5) to (start + 0, 12) +- Code(Counter(0)) at (prev + 3, 5) to (start + 0, 15) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c8 Function name: match_arms::match_arms -Raw bytes (95): 0x[01, 01, 03, 01, 07, 0b, 0d, 05, 09, 11, 01, 18, 01, 00, 1b, 01, 01, 05, 00, 0e, 01, 02, 0b, 00, 10, 05, 01, 11, 00, 12, 05, 00, 17, 00, 1e, 05, 00, 1f, 00, 20, 09, 01, 11, 00, 12, 09, 00, 17, 00, 1e, 09, 00, 1f, 00, 20, 0d, 01, 11, 00, 12, 0d, 00, 17, 00, 1e, 0d, 00, 1f, 00, 20, 02, 01, 11, 00, 12, 02, 00, 17, 00, 1e, 02, 00, 1f, 00, 20, 01, 03, 05, 00, 0c, 01, 01, 01, 00, 02] +Raw bytes (55): 0x[01, 01, 03, 01, 07, 0b, 0d, 05, 09, 09, 01, 18, 01, 00, 1b, 01, 01, 05, 00, 0e, 01, 02, 0b, 00, 10, 05, 01, 17, 00, 21, 09, 01, 17, 00, 21, 0d, 01, 17, 00, 21, 02, 01, 17, 00, 21, 01, 03, 05, 00, 0f, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/match-arms.rs Number of expressions: 3 - expression 0 operands: lhs = Counter(0), rhs = Expression(1, Add) - expression 1 operands: lhs = Expression(2, Add), rhs = Counter(3) - expression 2 operands: lhs = Counter(1), rhs = Counter(2) -Number of file 0 mappings: 17 +Number of file 0 mappings: 9 - Code(Counter(0)) at (prev + 24, 1) to (start + 0, 27) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) - Code(Counter(0)) at (prev + 2, 11) to (start + 0, 16) -- Code(Counter(1)) at (prev + 1, 17) to (start + 0, 18) -- Code(Counter(1)) at (prev + 0, 23) to (start + 0, 30) -- Code(Counter(1)) at (prev + 0, 31) to (start + 0, 32) -- Code(Counter(2)) at (prev + 1, 17) to (start + 0, 18) -- Code(Counter(2)) at (prev + 0, 23) to (start + 0, 30) -- Code(Counter(2)) at (prev + 0, 31) to (start + 0, 32) -- Code(Counter(3)) at (prev + 1, 17) to (start + 0, 18) -- Code(Counter(3)) at (prev + 0, 23) to (start + 0, 30) -- Code(Counter(3)) at (prev + 0, 31) to (start + 0, 32) -- Code(Expression(0, Sub)) at (prev + 1, 17) to (start + 0, 18) - = (c0 - ((c1 + c2) + c3)) -- Code(Expression(0, Sub)) at (prev + 0, 23) to (start + 0, 30) +- Code(Counter(1)) at (prev + 1, 23) to (start + 0, 33) +- Code(Counter(2)) at (prev + 1, 23) to (start + 0, 33) +- Code(Counter(3)) at (prev + 1, 23) to (start + 0, 33) +- Code(Expression(0, Sub)) at (prev + 1, 23) to (start + 0, 33) = (c0 - ((c1 + c2) + c3)) -- Code(Expression(0, Sub)) at (prev + 0, 31) to (start + 0, 32) - = (c0 - ((c1 + c2) + c3)) -- Code(Counter(0)) at (prev + 3, 5) to (start + 0, 12) +- Code(Counter(0)) at (prev + 3, 5) to (start + 0, 15) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c3 Function name: match_arms::or_patterns -Raw bytes (79): 0x[01, 01, 05, 05, 09, 01, 0b, 03, 0d, 01, 03, 01, 03, 0d, 01, 25, 01, 00, 1c, 01, 01, 05, 00, 0e, 01, 02, 0b, 00, 10, 05, 01, 11, 00, 12, 09, 00, 1e, 00, 1f, 03, 00, 24, 00, 2b, 03, 00, 2c, 00, 2d, 0d, 01, 11, 00, 12, 06, 00, 1e, 00, 1f, 12, 00, 24, 00, 2b, 12, 00, 2c, 00, 2d, 01, 03, 05, 00, 0c, 01, 01, 01, 00, 02] +Raw bytes (43): 0x[01, 01, 02, 05, 09, 01, 03, 07, 01, 25, 01, 00, 1c, 01, 01, 05, 00, 0e, 01, 02, 0b, 00, 10, 03, 01, 24, 00, 2e, 06, 01, 24, 00, 2e, 01, 03, 05, 00, 0f, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/match-arms.rs -Number of expressions: 5 +Number of expressions: 2 - expression 0 operands: lhs = Counter(1), rhs = Counter(2) -- expression 1 operands: lhs = Counter(0), rhs = Expression(2, Add) -- expression 2 operands: lhs = Expression(0, Add), rhs = Counter(3) -- expression 3 operands: lhs = Counter(0), rhs = Expression(0, Add) -- expression 4 operands: lhs = Counter(0), rhs = Expression(0, Add) -Number of file 0 mappings: 13 +- expression 1 operands: lhs = Counter(0), rhs = Expression(0, Add) +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 37, 1) to (start + 0, 28) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) - Code(Counter(0)) at (prev + 2, 11) to (start + 0, 16) -- Code(Counter(1)) at (prev + 1, 17) to (start + 0, 18) -- Code(Counter(2)) at (prev + 0, 30) to (start + 0, 31) -- Code(Expression(0, Add)) at (prev + 0, 36) to (start + 0, 43) - = (c1 + c2) -- Code(Expression(0, Add)) at (prev + 0, 44) to (start + 0, 45) +- Code(Expression(0, Add)) at (prev + 1, 36) to (start + 0, 46) = (c1 + c2) -- Code(Counter(3)) at (prev + 1, 17) to (start + 0, 18) -- Code(Expression(1, Sub)) at (prev + 0, 30) to (start + 0, 31) - = (c0 - ((c1 + c2) + c3)) -- Code(Expression(4, Sub)) at (prev + 0, 36) to (start + 0, 43) - = (c0 - (c1 + c2)) -- Code(Expression(4, Sub)) at (prev + 0, 44) to (start + 0, 45) +- Code(Expression(1, Sub)) at (prev + 1, 36) to (start + 0, 46) = (c0 - (c1 + c2)) -- Code(Counter(0)) at (prev + 3, 5) to (start + 0, 12) +- Code(Counter(0)) at (prev + 3, 5) to (start + 0, 15) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) -Highest counter ID seen: c3 +Highest counter ID seen: c0 diff --git a/tests/coverage/branch/match-arms.coverage b/tests/coverage/branch/match-arms.coverage index ea8a6f97ab154..846bd0e073896 100644 --- a/tests/coverage/branch/match-arms.coverage +++ b/tests/coverage/branch/match-arms.coverage @@ -39,9 +39,7 @@ LL| | LL| 15| match value { LL| 12| Enum::D(x) | Enum::C(x) => consume(x), - ^8 ^4 LL| 3| Enum::B(y) | Enum::A(y) => consume(y), - ^2 ^1 LL| | } LL| | LL| 15| consume(0); @@ -50,20 +48,24 @@ LL| 45|fn guards(value: Enum, cond: bool) { LL| 45| no_merge!(); LL| | - LL| 3| match value { - LL| 8| Enum::D(d) if cond => consume(d), + LL| 45| match value { + LL| 24| Enum::D(d) if cond => consume(d), + ^8 ------------------ | Branch (LL:23): [True: 8, False: 16] ------------------ - LL| 4| Enum::C(c) if cond => consume(c), + LL| 12| Enum::C(c) if cond => consume(c), + ^4 ------------------ | Branch (LL:23): [True: 4, False: 8] ------------------ - LL| 2| Enum::B(b) if cond => consume(b), + LL| 6| Enum::B(b) if cond => consume(b), + ^2 ------------------ | Branch (LL:23): [True: 2, False: 4] ------------------ - LL| 1| Enum::A(a) if cond => consume(a), + LL| 3| Enum::A(a) if cond => consume(a), + ^1 ------------------ | Branch (LL:23): [True: 1, False: 2] ------------------ diff --git a/tests/coverage/branch/match-trivial.cov-map b/tests/coverage/branch/match-trivial.cov-map index a88e89523ae26..b519d5c890173 100644 --- a/tests/coverage/branch/match-trivial.cov-map +++ b/tests/coverage/branch/match-trivial.cov-map @@ -9,16 +9,16 @@ Number of file 0 mappings: 2 Highest counter ID seen: (none) Function name: match_trivial::trivial -Raw bytes (34): 0x[01, 01, 00, 06, 01, 1e, 01, 00, 17, 01, 01, 05, 00, 0e, 01, 02, 0b, 00, 0c, 01, 01, 1b, 00, 22, 01, 03, 05, 00, 0c, 01, 01, 01, 00, 02] +Raw bytes (34): 0x[01, 01, 00, 06, 01, 1e, 01, 00, 17, 01, 01, 05, 00, 0e, 01, 02, 05, 02, 06, 01, 00, 0b, 00, 0c, 01, 04, 05, 00, 14, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/match-trivial.rs Number of expressions: 0 Number of file 0 mappings: 6 - Code(Counter(0)) at (prev + 30, 1) to (start + 0, 23) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 2, 11) to (start + 0, 12) -- Code(Counter(0)) at (prev + 1, 27) to (start + 0, 34) -- Code(Counter(0)) at (prev + 3, 5) to (start + 0, 12) +- Code(Counter(0)) at (prev + 2, 5) to (start + 2, 6) +- Code(Counter(0)) at (prev + 0, 11) to (start + 0, 12) +- Code(Counter(0)) at (prev + 4, 5) to (start + 0, 20) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/branch/match-trivial.coverage b/tests/coverage/branch/match-trivial.coverage index 6e7bf2d29abc3..3bdfff1d9383c 100644 --- a/tests/coverage/branch/match-trivial.coverage +++ b/tests/coverage/branch/match-trivial.coverage @@ -32,7 +32,7 @@ LL| | LL| 1| match x { LL| 1| Trivial::Value => consume("trivial"), - LL| | } + LL| 1| } LL| | LL| 1| consume("done"); LL| 1|} diff --git a/tests/coverage/branch/while.cov-map b/tests/coverage/branch/while.cov-map index 767a7e46495fa..8f4662ac553f0 100644 --- a/tests/coverage/branch/while.cov-map +++ b/tests/coverage/branch/while.cov-map @@ -1,89 +1,87 @@ Function name: while::while_cond -Raw bytes (48): 0x[01, 01, 01, 05, 01, 08, 01, 0c, 01, 00, 10, 01, 01, 05, 00, 0e, 01, 02, 09, 00, 0e, 01, 00, 11, 00, 12, 05, 01, 0b, 00, 10, 20, 02, 01, 00, 0b, 00, 10, 02, 00, 11, 02, 06, 01, 03, 01, 00, 02] +Raw bytes (43): 0x[01, 01, 01, 05, 01, 07, 01, 0c, 01, 00, 10, 01, 01, 05, 00, 0e, 01, 02, 11, 00, 12, 05, 01, 0b, 00, 10, 20, 02, 01, 00, 0b, 00, 10, 02, 01, 09, 00, 0f, 01, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/while.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(1), rhs = Counter(0) -Number of file 0 mappings: 8 +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 12, 1) to (start + 0, 16) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 18) +- Code(Counter(0)) at (prev + 2, 17) to (start + 0, 18) - Code(Counter(1)) at (prev + 1, 11) to (start + 0, 16) - Branch { true: Expression(0, Sub), false: Counter(0) } at (prev + 0, 11) to (start + 0, 16) true = (c1 - c0) false = c0 -- Code(Expression(0, Sub)) at (prev + 0, 17) to (start + 2, 6) +- Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 15) = (c1 - c0) -- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2) +- Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2) Highest counter ID seen: c1 Function name: while::while_cond_not -Raw bytes (48): 0x[01, 01, 01, 05, 01, 08, 01, 15, 01, 00, 14, 01, 01, 05, 00, 0e, 01, 02, 09, 00, 0e, 01, 00, 11, 00, 12, 05, 01, 0b, 00, 14, 20, 02, 01, 00, 0b, 00, 14, 02, 00, 15, 02, 06, 01, 03, 01, 00, 02] +Raw bytes (43): 0x[01, 01, 01, 05, 01, 07, 01, 15, 01, 00, 14, 01, 01, 05, 00, 0e, 01, 02, 11, 00, 12, 05, 01, 0b, 00, 14, 20, 02, 01, 00, 0b, 00, 14, 02, 01, 09, 00, 0f, 01, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/while.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(1), rhs = Counter(0) -Number of file 0 mappings: 8 +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 21, 1) to (start + 0, 20) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 18) +- Code(Counter(0)) at (prev + 2, 17) to (start + 0, 18) - Code(Counter(1)) at (prev + 1, 11) to (start + 0, 20) - Branch { true: Expression(0, Sub), false: Counter(0) } at (prev + 0, 11) to (start + 0, 20) true = (c1 - c0) false = c0 -- Code(Expression(0, Sub)) at (prev + 0, 21) to (start + 2, 6) +- Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 15) = (c1 - c0) -- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2) +- Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2) Highest counter ID seen: c1 Function name: while::while_op_and -Raw bytes (78): 0x[01, 01, 05, 05, 09, 05, 01, 0f, 05, 01, 09, 05, 01, 0c, 01, 1e, 01, 00, 12, 01, 01, 05, 00, 0e, 01, 02, 09, 00, 0e, 01, 00, 11, 00, 12, 01, 01, 09, 00, 0e, 01, 00, 11, 00, 12, 05, 01, 0b, 00, 10, 20, 09, 02, 00, 0b, 00, 10, 09, 00, 14, 00, 19, 20, 12, 0a, 00, 14, 00, 19, 12, 00, 1a, 03, 06, 01, 04, 01, 00, 02] +Raw bytes (75): 0x[01, 01, 06, 05, 09, 05, 01, 0f, 05, 01, 09, 05, 01, 05, 01, 0b, 01, 1e, 01, 00, 12, 01, 01, 05, 00, 0e, 01, 02, 11, 00, 12, 01, 01, 11, 00, 12, 05, 01, 0b, 00, 10, 20, 09, 02, 00, 0b, 00, 10, 09, 00, 14, 00, 19, 20, 16, 0a, 00, 14, 00, 19, 16, 01, 09, 00, 0f, 16, 01, 09, 00, 0f, 01, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/while.rs -Number of expressions: 5 +Number of expressions: 6 - expression 0 operands: lhs = Counter(1), rhs = Counter(2) - expression 1 operands: lhs = Counter(1), rhs = Counter(0) - expression 2 operands: lhs = Expression(3, Add), rhs = Counter(1) - expression 3 operands: lhs = Counter(0), rhs = Counter(2) - expression 4 operands: lhs = Counter(1), rhs = Counter(0) -Number of file 0 mappings: 12 +- expression 5 operands: lhs = Counter(1), rhs = Counter(0) +Number of file 0 mappings: 11 - Code(Counter(0)) at (prev + 30, 1) to (start + 0, 18) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 18) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 18) +- Code(Counter(0)) at (prev + 2, 17) to (start + 0, 18) +- Code(Counter(0)) at (prev + 1, 17) to (start + 0, 18) - Code(Counter(1)) at (prev + 1, 11) to (start + 0, 16) - Branch { true: Counter(2), false: Expression(0, Sub) } at (prev + 0, 11) to (start + 0, 16) true = c2 false = (c1 - c2) - Code(Counter(2)) at (prev + 0, 20) to (start + 0, 25) -- Branch { true: Expression(4, Sub), false: Expression(2, Sub) } at (prev + 0, 20) to (start + 0, 25) +- Branch { true: Expression(5, Sub), false: Expression(2, Sub) } at (prev + 0, 20) to (start + 0, 25) true = (c1 - c0) false = ((c0 + c2) - c1) -- Code(Expression(4, Sub)) at (prev + 0, 26) to (start + 3, 6) +- Code(Expression(5, Sub)) at (prev + 1, 9) to (start + 0, 15) + = (c1 - c0) +- Code(Expression(5, Sub)) at (prev + 1, 9) to (start + 0, 15) = (c1 - c0) -- Code(Counter(0)) at (prev + 4, 1) to (start + 0, 2) +- Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2) Highest counter ID seen: c2 Function name: while::while_op_or -Raw bytes (76): 0x[01, 01, 04, 05, 09, 05, 0b, 01, 09, 05, 01, 0c, 01, 29, 01, 00, 11, 01, 01, 05, 00, 0e, 01, 02, 09, 00, 0e, 01, 00, 11, 00, 12, 01, 01, 09, 00, 0e, 01, 00, 11, 00, 12, 05, 01, 0b, 00, 10, 20, 09, 02, 00, 0b, 00, 10, 02, 00, 14, 00, 19, 20, 06, 01, 00, 14, 00, 19, 0e, 00, 1a, 03, 06, 01, 04, 01, 00, 02] +Raw bytes (73): 0x[01, 01, 05, 05, 09, 05, 0b, 01, 09, 05, 01, 05, 01, 0b, 01, 29, 01, 00, 11, 01, 01, 05, 00, 0e, 01, 02, 11, 00, 12, 01, 01, 11, 00, 12, 05, 01, 0b, 00, 10, 20, 09, 02, 00, 0b, 00, 10, 02, 00, 14, 00, 19, 20, 06, 01, 00, 14, 00, 19, 12, 01, 09, 00, 0f, 12, 01, 09, 00, 0f, 01, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/while.rs -Number of expressions: 4 +Number of expressions: 5 - expression 0 operands: lhs = Counter(1), rhs = Counter(2) - expression 1 operands: lhs = Counter(1), rhs = Expression(2, Add) - expression 2 operands: lhs = Counter(0), rhs = Counter(2) - expression 3 operands: lhs = Counter(1), rhs = Counter(0) -Number of file 0 mappings: 12 +- expression 4 operands: lhs = Counter(1), rhs = Counter(0) +Number of file 0 mappings: 11 - Code(Counter(0)) at (prev + 41, 1) to (start + 0, 17) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 18) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 18) +- Code(Counter(0)) at (prev + 2, 17) to (start + 0, 18) +- Code(Counter(0)) at (prev + 1, 17) to (start + 0, 18) - Code(Counter(1)) at (prev + 1, 11) to (start + 0, 16) - Branch { true: Counter(2), false: Expression(0, Sub) } at (prev + 0, 11) to (start + 0, 16) true = c2 @@ -93,8 +91,10 @@ Number of file 0 mappings: 12 - Branch { true: Expression(1, Sub), false: Counter(0) } at (prev + 0, 20) to (start + 0, 25) true = (c1 - (c0 + c2)) false = c0 -- Code(Expression(3, Sub)) at (prev + 0, 26) to (start + 3, 6) +- Code(Expression(4, Sub)) at (prev + 1, 9) to (start + 0, 15) + = (c1 - c0) +- Code(Expression(4, Sub)) at (prev + 1, 9) to (start + 0, 15) = (c1 - c0) -- Code(Counter(0)) at (prev + 4, 1) to (start + 0, 2) +- Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2) Highest counter ID seen: c2 diff --git a/tests/coverage/branch/while.coverage b/tests/coverage/branch/while.coverage index 8d9a6c3bc68b7..f01bfd24e7934 100644 --- a/tests/coverage/branch/while.coverage +++ b/tests/coverage/branch/while.coverage @@ -18,7 +18,7 @@ | Branch (LL:11): [True: 8, False: 1] ------------------ LL| 8| a -= 1; - LL| 8| } + LL| | } LL| 1|} LL| | LL| 1|fn while_cond_not() { @@ -30,7 +30,7 @@ | Branch (LL:11): [True: 8, False: 1] ------------------ LL| 8| a -= 1; - LL| 8| } + LL| | } LL| 1|} LL| | LL| 1|fn while_op_and() { @@ -45,7 +45,7 @@ ------------------ LL| 4| a -= 1; LL| 4| b -= 1; - LL| 4| } + LL| | } LL| 1|} LL| | LL| 1|fn while_op_or() { @@ -61,7 +61,7 @@ ------------------ LL| 8| a -= 1; LL| 8| b -= 1; - LL| 8| } + LL| | } LL| 1|} LL| | LL| |#[coverage(off)] diff --git a/tests/coverage/call-method.cov-map b/tests/coverage/call-method.cov-map index 534cc4b6a58af..2ad5137a6c26b 100644 --- a/tests/coverage/call-method.cov-map +++ b/tests/coverage/call-method.cov-map @@ -1,19 +1,13 @@ Function name: call_method::call_method -Raw bytes (59): 0x[01, 01, 00, 0b, 01, 08, 01, 00, 11, 01, 01, 09, 00, 0e, 01, 00, 11, 00, 16, 01, 02, 05, 00, 0a, 01, 02, 09, 00, 0f, 01, 02, 0d, 00, 12, 01, 04, 05, 05, 0a, 01, 00, 05, 00, 0a, 01, 07, 09, 00, 0f, 01, 02, 0d, 00, 12, 01, 03, 01, 00, 02] +Raw bytes (29): 0x[01, 01, 00, 05, 01, 08, 01, 00, 11, 01, 01, 11, 00, 16, 01, 02, 05, 05, 0a, 01, 08, 05, 0a, 0a, 01, 0c, 01, 00, 02] Number of files: 1 - file 0 => $DIR/call-method.rs Number of expressions: 0 -Number of file 0 mappings: 11 +Number of file 0 mappings: 5 - Code(Counter(0)) at (prev + 8, 1) to (start + 0, 17) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 22) -- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 10) -- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 15) -- Code(Counter(0)) at (prev + 2, 13) to (start + 0, 18) -- Code(Counter(0)) at (prev + 4, 5) to (start + 5, 10) -- Code(Counter(0)) at (prev + 0, 5) to (start + 0, 10) -- Code(Counter(0)) at (prev + 7, 9) to (start + 0, 15) -- Code(Counter(0)) at (prev + 2, 13) to (start + 0, 18) -- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2) +- Code(Counter(0)) at (prev + 1, 17) to (start + 0, 22) +- Code(Counter(0)) at (prev + 2, 5) to (start + 5, 10) +- Code(Counter(0)) at (prev + 8, 5) to (start + 10, 10) +- Code(Counter(0)) at (prev + 12, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/call-method.coverage b/tests/coverage/call-method.coverage index afcdb0adc7b73..8c5bb57a2d788 100644 --- a/tests/coverage/call-method.coverage +++ b/tests/coverage/call-method.coverage @@ -9,11 +9,11 @@ LL| 1| let thing = Thing; LL| | LL| 1| thing - LL| | . + LL| 1| . LL| 1| method - LL| | ( + LL| 1| ( LL| 1| "arg" - LL| | ) + LL| 1| ) LL| | ; LL| | LL| 1| thing @@ -22,11 +22,11 @@ LL| 1| ( LL| 1| "arg" LL| 1| ) - LL| | . + LL| 1| . LL| 1| method - LL| | ( + LL| 1| ( LL| 1| "arg" - LL| | ) + LL| 1| ) LL| | ; LL| 1|} LL| | diff --git a/tests/coverage/closure_bug.cov-map b/tests/coverage/closure_bug.cov-map index a7087c69dcba5..ee3c3ad8de5a2 100644 --- a/tests/coverage/closure_bug.cov-map +++ b/tests/coverage/closure_bug.cov-map @@ -1,5 +1,5 @@ Function name: closure_bug::main -Raw bytes (132): 0x[01, 01, 04, 01, 05, 01, 09, 01, 0d, 01, 11, 18, 01, 07, 01, 00, 0a, 01, 01, 09, 00, 0f, 01, 00, 12, 00, 2d, 01, 02, 09, 00, 0a, 01, 06, 05, 00, 08, 01, 01, 08, 00, 0e, 05, 00, 0f, 00, 17, 02, 00, 16, 00, 17, 01, 02, 09, 00, 0a, 01, 06, 05, 00, 08, 01, 01, 08, 00, 0e, 09, 00, 0f, 00, 17, 06, 00, 16, 00, 17, 01, 02, 09, 00, 0a, 01, 06, 05, 00, 08, 01, 01, 08, 00, 0e, 0d, 00, 0f, 00, 17, 0a, 00, 16, 00, 17, 01, 02, 09, 00, 0a, 01, 06, 05, 00, 08, 01, 01, 08, 00, 0e, 11, 00, 0f, 00, 17, 0e, 00, 16, 00, 17, 01, 01, 01, 00, 02] +Raw bytes (107): 0x[01, 01, 04, 01, 05, 01, 09, 01, 0d, 01, 11, 13, 01, 07, 01, 00, 0a, 01, 01, 12, 00, 2d, 01, 08, 05, 00, 08, 01, 01, 08, 00, 0e, 05, 00, 11, 00, 14, 02, 00, 16, 00, 17, 01, 08, 05, 00, 08, 01, 01, 08, 00, 0e, 09, 00, 11, 00, 14, 06, 00, 16, 00, 17, 01, 08, 05, 00, 08, 01, 01, 08, 00, 0e, 0d, 00, 11, 00, 14, 0a, 00, 16, 00, 17, 01, 08, 05, 00, 08, 01, 01, 08, 00, 0e, 11, 00, 11, 00, 14, 0e, 00, 16, 00, 17, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/closure_bug.rs Number of expressions: 4 @@ -7,32 +7,27 @@ Number of expressions: 4 - expression 1 operands: lhs = Counter(0), rhs = Counter(2) - expression 2 operands: lhs = Counter(0), rhs = Counter(3) - expression 3 operands: lhs = Counter(0), rhs = Counter(4) -Number of file 0 mappings: 24 +Number of file 0 mappings: 19 - Code(Counter(0)) at (prev + 7, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 15) -- Code(Counter(0)) at (prev + 0, 18) to (start + 0, 45) -- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 10) -- Code(Counter(0)) at (prev + 6, 5) to (start + 0, 8) +- Code(Counter(0)) at (prev + 1, 18) to (start + 0, 45) +- Code(Counter(0)) at (prev + 8, 5) to (start + 0, 8) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 14) -- Code(Counter(1)) at (prev + 0, 15) to (start + 0, 23) +- Code(Counter(1)) at (prev + 0, 17) to (start + 0, 20) - Code(Expression(0, Sub)) at (prev + 0, 22) to (start + 0, 23) = (c0 - c1) -- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 10) -- Code(Counter(0)) at (prev + 6, 5) to (start + 0, 8) +- Code(Counter(0)) at (prev + 8, 5) to (start + 0, 8) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 14) -- Code(Counter(2)) at (prev + 0, 15) to (start + 0, 23) +- Code(Counter(2)) at (prev + 0, 17) to (start + 0, 20) - Code(Expression(1, Sub)) at (prev + 0, 22) to (start + 0, 23) = (c0 - c2) -- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 10) -- Code(Counter(0)) at (prev + 6, 5) to (start + 0, 8) +- Code(Counter(0)) at (prev + 8, 5) to (start + 0, 8) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 14) -- Code(Counter(3)) at (prev + 0, 15) to (start + 0, 23) +- Code(Counter(3)) at (prev + 0, 17) to (start + 0, 20) - Code(Expression(2, Sub)) at (prev + 0, 22) to (start + 0, 23) = (c0 - c3) -- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 10) -- Code(Counter(0)) at (prev + 6, 5) to (start + 0, 8) +- Code(Counter(0)) at (prev + 8, 5) to (start + 0, 8) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 14) -- Code(Counter(4)) at (prev + 0, 15) to (start + 0, 23) +- Code(Counter(4)) at (prev + 0, 17) to (start + 0, 20) - Code(Expression(3, Sub)) at (prev + 0, 22) to (start + 0, 23) = (c0 - c4) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) diff --git a/tests/coverage/closure_bug.coverage b/tests/coverage/closure_bug.coverage index b85375d1850b7..b6e1338ee3bed 100644 --- a/tests/coverage/closure_bug.coverage +++ b/tests/coverage/closure_bug.coverage @@ -7,7 +7,7 @@ LL| 1|fn main() { LL| 1| let truthy = std::env::args().len() == 1; LL| | - LL| 1| let a + LL| | let a LL| | = LL| | | LL| | | @@ -18,7 +18,7 @@ LL| 1| if truthy { a(); } ^0 LL| | - LL| 1| let b + LL| | let b LL| | = LL| | | LL| | | @@ -29,7 +29,7 @@ LL| 1| if truthy { b(); } ^0 LL| | - LL| 1| let c + LL| | let c LL| | = LL| | | LL| | | @@ -40,7 +40,7 @@ LL| 1| if truthy { c(); } ^0 LL| | - LL| 1| let d + LL| | let d LL| | = LL| | | LL| | | diff --git a/tests/coverage/closure_unit_return.cov-map b/tests/coverage/closure_unit_return.cov-map index f665d93e6e1c8..cb0a5a2334f5c 100644 --- a/tests/coverage/closure_unit_return.cov-map +++ b/tests/coverage/closure_unit_return.cov-map @@ -1,13 +1,11 @@ Function name: closure_unit_return::explicit_unit -Raw bytes (34): 0x[01, 01, 00, 06, 01, 07, 01, 00, 13, 01, 01, 09, 00, 10, 01, 04, 05, 00, 09, 01, 00, 0a, 00, 11, 01, 01, 05, 00, 07, 01, 01, 01, 00, 02] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 07, 01, 00, 13, 01, 05, 05, 00, 12, 01, 01, 05, 00, 07, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/closure_unit_return.rs Number of expressions: 0 -Number of file 0 mappings: 6 +Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 7, 1) to (start + 0, 19) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 16) -- Code(Counter(0)) at (prev + 4, 5) to (start + 0, 9) -- Code(Counter(0)) at (prev + 0, 10) to (start + 0, 17) +- Code(Counter(0)) at (prev + 5, 5) to (start + 0, 18) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 7) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 @@ -24,15 +22,13 @@ Number of file 0 mappings: 3 Highest counter ID seen: (none) Function name: closure_unit_return::implicit_unit -Raw bytes (29): 0x[01, 01, 00, 05, 01, 10, 01, 00, 13, 01, 01, 09, 00, 10, 01, 04, 05, 00, 09, 01, 00, 0a, 00, 11, 01, 02, 01, 00, 02] +Raw bytes (19): 0x[01, 01, 00, 03, 01, 10, 01, 00, 13, 01, 05, 05, 00, 12, 01, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/closure_unit_return.rs Number of expressions: 0 -Number of file 0 mappings: 5 +Number of file 0 mappings: 3 - Code(Counter(0)) at (prev + 16, 1) to (start + 0, 19) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 16) -- Code(Counter(0)) at (prev + 4, 5) to (start + 0, 9) -- Code(Counter(0)) at (prev + 0, 10) to (start + 0, 17) +- Code(Counter(0)) at (prev + 5, 5) to (start + 0, 18) - Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/closure_unit_return.coverage b/tests/coverage/closure_unit_return.coverage index 02ea63b6dc394..f461e5b449d8a 100644 --- a/tests/coverage/closure_unit_return.coverage +++ b/tests/coverage/closure_unit_return.coverage @@ -5,8 +5,7 @@ LL| |// of their trailing expression, and functions that implicitly return `()`. LL| | LL| 1|fn explicit_unit() { - LL| 1| let closure = || { - ^0 + LL| 0| let closure = || { LL| 0| (); LL| 0| }; LL| | @@ -15,8 +14,7 @@ LL| 1|} LL| | LL| 1|fn implicit_unit() { - LL| 1| let closure = || { - ^0 + LL| 0| let closure = || { LL| 0| (); LL| 0| }; LL| | diff --git a/tests/coverage/color.coverage b/tests/coverage/color.coverage index 4e6ef6b60ce0e..e314f7232140b 100644 --- a/tests/coverage/color.coverage +++ b/tests/coverage/color.coverage @@ -7,7 +7,7 @@ LL| |// Ignored on Windows because we can't tell the tool to use ANSI escapes. LL| | LL| 1|fn main() { - LL| 1| for _i in 0..0 {} - ^0 ^0 + LL| 1| for _i in 0..0 {} + ^0 LL| 1|} diff --git a/tests/coverage/condition/conditions.cov-map b/tests/coverage/condition/conditions.cov-map index fda5dd1b97d13..cdf51e483d04a 100644 --- a/tests/coverage/condition/conditions.cov-map +++ b/tests/coverage/condition/conditions.cov-map @@ -1,5 +1,5 @@ Function name: conditions::assign_3_and_or -Raw bytes (75): 0x[01, 01, 05, 01, 05, 05, 09, 01, 09, 01, 13, 09, 0d, 0b, 01, 1c, 01, 00, 2e, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 02, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 20, 09, 06, 00, 12, 00, 13, 0a, 00, 17, 00, 18, 20, 0d, 0e, 00, 17, 00, 18, 01, 01, 05, 00, 0e, 01, 00, 0f, 00, 10, 01, 01, 01, 00, 02] +Raw bytes (65): 0x[01, 01, 05, 01, 05, 05, 09, 01, 09, 01, 13, 09, 0d, 09, 01, 1c, 01, 00, 2e, 01, 01, 0d, 00, 0e, 20, 05, 02, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 20, 09, 06, 00, 12, 00, 13, 0a, 00, 17, 00, 18, 20, 0d, 0e, 00, 17, 00, 18, 01, 01, 05, 00, 11, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/conditions.rs Number of expressions: 5 @@ -8,10 +8,9 @@ Number of expressions: 5 - expression 2 operands: lhs = Counter(0), rhs = Counter(2) - expression 3 operands: lhs = Counter(0), rhs = Expression(4, Add) - expression 4 operands: lhs = Counter(2), rhs = Counter(3) -Number of file 0 mappings: 11 +Number of file 0 mappings: 9 - Code(Counter(0)) at (prev + 28, 1) to (start + 0, 46) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10) -- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14) +- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 14) - Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 0, 13) to (start + 0, 14) true = c1 false = (c0 - c1) @@ -24,13 +23,12 @@ Number of file 0 mappings: 11 - Branch { true: Counter(3), false: Expression(3, Sub) } at (prev + 0, 23) to (start + 0, 24) true = c3 false = (c0 - (c2 + c3)) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 16) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 17) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c3 Function name: conditions::assign_3_or_and -Raw bytes (73): 0x[01, 01, 04, 01, 05, 01, 0b, 05, 09, 09, 0d, 0b, 01, 17, 01, 00, 2e, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 02, 00, 0d, 00, 0e, 02, 00, 12, 00, 13, 20, 09, 06, 00, 12, 00, 13, 09, 00, 17, 00, 18, 20, 0d, 0e, 00, 17, 00, 18, 01, 01, 05, 00, 0e, 01, 00, 0f, 00, 10, 01, 01, 01, 00, 02] +Raw bytes (63): 0x[01, 01, 04, 01, 05, 01, 0b, 05, 09, 09, 0d, 09, 01, 17, 01, 00, 2e, 01, 01, 0d, 00, 0e, 20, 05, 02, 00, 0d, 00, 0e, 02, 00, 12, 00, 13, 20, 09, 06, 00, 12, 00, 13, 09, 00, 17, 00, 18, 20, 0d, 0e, 00, 17, 00, 18, 01, 01, 05, 00, 11, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/conditions.rs Number of expressions: 4 @@ -38,10 +36,9 @@ Number of expressions: 4 - expression 1 operands: lhs = Counter(0), rhs = Expression(2, Add) - expression 2 operands: lhs = Counter(1), rhs = Counter(2) - expression 3 operands: lhs = Counter(2), rhs = Counter(3) -Number of file 0 mappings: 11 +Number of file 0 mappings: 9 - Code(Counter(0)) at (prev + 23, 1) to (start + 0, 46) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10) -- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14) +- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 14) - Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 0, 13) to (start + 0, 14) true = c1 false = (c0 - c1) @@ -54,22 +51,20 @@ Number of file 0 mappings: 11 - Branch { true: Counter(3), false: Expression(3, Sub) } at (prev + 0, 23) to (start + 0, 24) true = c3 false = (c2 - c3) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 16) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 17) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c3 Function name: conditions::assign_and -Raw bytes (57): 0x[01, 01, 02, 01, 05, 05, 09, 09, 01, 0d, 01, 00, 20, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 02, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 20, 09, 06, 00, 12, 00, 13, 01, 01, 05, 00, 0e, 01, 00, 0f, 00, 10, 01, 01, 01, 00, 02] +Raw bytes (47): 0x[01, 01, 02, 01, 05, 05, 09, 07, 01, 0d, 01, 00, 20, 01, 01, 0d, 00, 0e, 20, 05, 02, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 20, 09, 06, 00, 12, 00, 13, 01, 01, 05, 00, 11, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/conditions.rs Number of expressions: 2 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) - expression 1 operands: lhs = Counter(1), rhs = Counter(2) -Number of file 0 mappings: 9 +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 13, 1) to (start + 0, 32) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10) -- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14) +- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 14) - Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 0, 13) to (start + 0, 14) true = c1 false = (c0 - c1) @@ -77,23 +72,21 @@ Number of file 0 mappings: 9 - Branch { true: Counter(2), false: Expression(1, Sub) } at (prev + 0, 18) to (start + 0, 19) true = c2 false = (c1 - c2) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 16) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 17) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c2 Function name: conditions::assign_or -Raw bytes (59): 0x[01, 01, 03, 01, 05, 01, 0b, 05, 09, 09, 01, 12, 01, 00, 1f, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 02, 00, 0d, 00, 0e, 02, 00, 12, 00, 13, 20, 09, 06, 00, 12, 00, 13, 01, 01, 05, 00, 0e, 01, 00, 0f, 00, 10, 01, 01, 01, 00, 02] +Raw bytes (49): 0x[01, 01, 03, 01, 05, 01, 0b, 05, 09, 07, 01, 12, 01, 00, 1f, 01, 01, 0d, 00, 0e, 20, 05, 02, 00, 0d, 00, 0e, 02, 00, 12, 00, 13, 20, 09, 06, 00, 12, 00, 13, 01, 01, 05, 00, 11, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/conditions.rs Number of expressions: 3 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) - expression 1 operands: lhs = Counter(0), rhs = Expression(2, Add) - expression 2 operands: lhs = Counter(1), rhs = Counter(2) -Number of file 0 mappings: 9 +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 18, 1) to (start + 0, 31) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10) -- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14) +- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 14) - Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 0, 13) to (start + 0, 14) true = c1 false = (c0 - c1) @@ -102,20 +95,18 @@ Number of file 0 mappings: 9 - Branch { true: Counter(2), false: Expression(1, Sub) } at (prev + 0, 18) to (start + 0, 19) true = c2 false = (c0 - (c1 + c2)) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 16) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 17) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c2 Function name: conditions::foo -Raw bytes (24): 0x[01, 01, 00, 04, 01, 21, 01, 00, 18, 01, 01, 05, 00, 0e, 01, 00, 0f, 00, 10, 01, 01, 01, 00, 02] +Raw bytes (19): 0x[01, 01, 00, 03, 01, 21, 01, 00, 18, 01, 01, 05, 00, 11, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/conditions.rs Number of expressions: 0 -Number of file 0 mappings: 4 +Number of file 0 mappings: 3 - Code(Counter(0)) at (prev + 33, 1) to (start + 0, 24) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 16) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 17) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 @@ -141,16 +132,14 @@ Number of file 0 mappings: 7 Highest counter ID seen: c2 Function name: conditions::simple_assign -Raw bytes (34): 0x[01, 01, 00, 06, 01, 08, 01, 00, 1a, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 01, 01, 05, 00, 0e, 01, 00, 0f, 00, 10, 01, 01, 01, 00, 02] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 08, 01, 00, 1a, 01, 01, 0d, 00, 0e, 01, 01, 05, 00, 11, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/conditions.rs Number of expressions: 0 -Number of file 0 mappings: 6 +Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 8, 1) to (start + 0, 26) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10) -- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 16) +- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 14) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 17) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/coverage_attr_closure.cov-map b/tests/coverage/coverage_attr_closure.cov-map index aea805df303ea..b9daeed9624b1 100644 --- a/tests/coverage/coverage_attr_closure.cov-map +++ b/tests/coverage/coverage_attr_closure.cov-map @@ -1,45 +1,46 @@ Function name: coverage_attr_closure::GLOBAL_CLOSURE_ON::{closure#0} -Raw bytes (19): 0x[01, 01, 00, 03, 01, 06, 0f, 00, 10, 01, 01, 05, 00, 0d, 01, 01, 01, 00, 02] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 06, 0f, 00, 10, 01, 01, 05, 00, 0d, 01, 00, 10, 00, 15, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/coverage_attr_closure.rs Number of expressions: 0 -Number of file 0 mappings: 3 +Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 6, 15) to (start + 0, 16) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 21) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: coverage_attr_closure::contains_closures_off::{closure#0} (unused) -Raw bytes (19): 0x[01, 01, 00, 03, 00, 1d, 13, 00, 14, 00, 01, 09, 00, 11, 00, 01, 05, 00, 06] +Raw bytes (24): 0x[01, 01, 00, 04, 00, 1d, 13, 00, 14, 00, 01, 09, 00, 11, 00, 00, 14, 00, 19, 00, 01, 05, 00, 06] Number of files: 1 - file 0 => $DIR/coverage_attr_closure.rs Number of expressions: 0 -Number of file 0 mappings: 3 +Number of file 0 mappings: 4 - Code(Zero) at (prev + 29, 19) to (start + 0, 20) - Code(Zero) at (prev + 1, 9) to (start + 0, 17) +- Code(Zero) at (prev + 0, 20) to (start + 0, 25) - Code(Zero) at (prev + 1, 5) to (start + 0, 6) Highest counter ID seen: (none) Function name: coverage_attr_closure::contains_closures_on -Raw bytes (24): 0x[01, 01, 00, 04, 01, 0f, 01, 00, 1a, 01, 01, 09, 00, 1a, 01, 04, 09, 00, 1b, 01, 04, 01, 00, 02] +Raw bytes (14): 0x[01, 01, 00, 02, 01, 0f, 01, 00, 1a, 01, 09, 01, 00, 02] Number of files: 1 - file 0 => $DIR/coverage_attr_closure.rs Number of expressions: 0 -Number of file 0 mappings: 4 +Number of file 0 mappings: 2 - Code(Counter(0)) at (prev + 15, 1) to (start + 0, 26) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 26) -- Code(Counter(0)) at (prev + 4, 9) to (start + 0, 27) -- Code(Counter(0)) at (prev + 4, 1) to (start + 0, 2) +- Code(Counter(0)) at (prev + 9, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: coverage_attr_closure::contains_closures_on::{closure#0} (unused) -Raw bytes (19): 0x[01, 01, 00, 03, 00, 11, 13, 00, 14, 00, 01, 09, 00, 11, 00, 01, 05, 00, 06] +Raw bytes (24): 0x[01, 01, 00, 04, 00, 11, 13, 00, 14, 00, 01, 09, 00, 11, 00, 00, 14, 00, 19, 00, 01, 05, 00, 06] Number of files: 1 - file 0 => $DIR/coverage_attr_closure.rs Number of expressions: 0 -Number of file 0 mappings: 3 +Number of file 0 mappings: 4 - Code(Zero) at (prev + 17, 19) to (start + 0, 20) - Code(Zero) at (prev + 1, 9) to (start + 0, 17) +- Code(Zero) at (prev + 0, 20) to (start + 0, 25) - Code(Zero) at (prev + 1, 5) to (start + 0, 6) Highest counter ID seen: (none) diff --git a/tests/coverage/coverage_attr_closure.coverage b/tests/coverage/coverage_attr_closure.coverage index 7bdb96bdab851..c21ca529b2909 100644 --- a/tests/coverage/coverage_attr_closure.coverage +++ b/tests/coverage/coverage_attr_closure.coverage @@ -13,11 +13,11 @@ LL| | LL| |#[coverage(on)] LL| 1|fn contains_closures_on() { - LL| 1| let _local_closure_on = #[coverage(on)] + LL| | let _local_closure_on = #[coverage(on)] LL| 0| |input: &str| { LL| 0| println!("{input}"); LL| 0| }; - LL| 1| let _local_closure_off = #[coverage(off)] + LL| | let _local_closure_off = #[coverage(off)] LL| | |input: &str| { LL| | println!("{input}"); LL| | }; diff --git a/tests/coverage/dead_code.cov-map b/tests/coverage/dead_code.cov-map index ae4146dc24678..2f428cf23f717 100644 --- a/tests/coverage/dead_code.cov-map +++ b/tests/coverage/dead_code.cov-map @@ -1,53 +1,47 @@ Function name: dead_code::main -Raw bytes (51): 0x[01, 01, 01, 01, 05, 09, 01, 1b, 01, 00, 0a, 01, 04, 09, 00, 10, 01, 00, 13, 00, 2e, 01, 02, 09, 00, 16, 01, 00, 19, 00, 1a, 01, 01, 08, 00, 0f, 05, 00, 10, 02, 06, 02, 02, 05, 00, 06, 01, 01, 01, 00, 02] +Raw bytes (41): 0x[01, 01, 01, 01, 05, 07, 01, 1b, 01, 00, 0a, 01, 04, 13, 00, 2e, 01, 02, 19, 00, 1a, 01, 01, 08, 00, 0f, 05, 01, 09, 00, 17, 02, 01, 05, 00, 06, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/dead_code.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 9 +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 27, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 4, 9) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 19) to (start + 0, 46) -- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 22) -- Code(Counter(0)) at (prev + 0, 25) to (start + 0, 26) +- Code(Counter(0)) at (prev + 4, 19) to (start + 0, 46) +- Code(Counter(0)) at (prev + 2, 25) to (start + 0, 26) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 15) -- Code(Counter(1)) at (prev + 0, 16) to (start + 2, 6) -- Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 6) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 23) +- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 6) = (c0 - c1) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c1 Function name: dead_code::unused_fn (unused) -Raw bytes (49): 0x[01, 01, 00, 09, 00, 0f, 01, 00, 0f, 00, 04, 09, 00, 10, 00, 00, 13, 00, 2e, 00, 02, 09, 00, 16, 00, 00, 19, 00, 1a, 00, 01, 08, 00, 0f, 00, 00, 10, 02, 06, 00, 02, 05, 00, 06, 00, 01, 01, 00, 02] +Raw bytes (39): 0x[01, 01, 00, 07, 00, 0f, 01, 00, 0f, 00, 04, 13, 00, 2e, 00, 02, 19, 00, 1a, 00, 01, 08, 00, 0f, 00, 01, 09, 00, 17, 00, 01, 05, 00, 06, 00, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/dead_code.rs Number of expressions: 0 -Number of file 0 mappings: 9 +Number of file 0 mappings: 7 - Code(Zero) at (prev + 15, 1) to (start + 0, 15) -- Code(Zero) at (prev + 4, 9) to (start + 0, 16) -- Code(Zero) at (prev + 0, 19) to (start + 0, 46) -- Code(Zero) at (prev + 2, 9) to (start + 0, 22) -- Code(Zero) at (prev + 0, 25) to (start + 0, 26) +- Code(Zero) at (prev + 4, 19) to (start + 0, 46) +- Code(Zero) at (prev + 2, 25) to (start + 0, 26) - Code(Zero) at (prev + 1, 8) to (start + 0, 15) -- Code(Zero) at (prev + 0, 16) to (start + 2, 6) -- Code(Zero) at (prev + 2, 5) to (start + 0, 6) +- Code(Zero) at (prev + 1, 9) to (start + 0, 23) +- Code(Zero) at (prev + 1, 5) to (start + 0, 6) - Code(Zero) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: (none) Function name: dead_code::unused_pub_fn_not_in_library (unused) -Raw bytes (49): 0x[01, 01, 00, 09, 00, 03, 01, 00, 26, 00, 04, 09, 00, 10, 00, 00, 13, 00, 2e, 00, 02, 09, 00, 16, 00, 00, 19, 00, 1a, 00, 01, 08, 00, 0f, 00, 00, 10, 02, 06, 00, 02, 05, 00, 06, 00, 01, 01, 00, 02] +Raw bytes (39): 0x[01, 01, 00, 07, 00, 03, 01, 00, 26, 00, 04, 13, 00, 2e, 00, 02, 19, 00, 1a, 00, 01, 08, 00, 0f, 00, 01, 09, 00, 17, 00, 01, 05, 00, 06, 00, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/dead_code.rs Number of expressions: 0 -Number of file 0 mappings: 9 +Number of file 0 mappings: 7 - Code(Zero) at (prev + 3, 1) to (start + 0, 38) -- Code(Zero) at (prev + 4, 9) to (start + 0, 16) -- Code(Zero) at (prev + 0, 19) to (start + 0, 46) -- Code(Zero) at (prev + 2, 9) to (start + 0, 22) -- Code(Zero) at (prev + 0, 25) to (start + 0, 26) +- Code(Zero) at (prev + 4, 19) to (start + 0, 46) +- Code(Zero) at (prev + 2, 25) to (start + 0, 26) - Code(Zero) at (prev + 1, 8) to (start + 0, 15) -- Code(Zero) at (prev + 0, 16) to (start + 2, 6) -- Code(Zero) at (prev + 2, 5) to (start + 0, 6) +- Code(Zero) at (prev + 1, 9) to (start + 0, 23) +- Code(Zero) at (prev + 1, 5) to (start + 0, 6) - Code(Zero) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: (none) diff --git a/tests/coverage/dead_code.coverage b/tests/coverage/dead_code.coverage index fbb4a001d959a..b29675b5674be 100644 --- a/tests/coverage/dead_code.coverage +++ b/tests/coverage/dead_code.coverage @@ -33,7 +33,6 @@ LL| 1| let mut countdown = 0; LL| 1| if is_true { LL| 1| countdown = 10; - LL| 1| } - ^0 + LL| 0| } LL| 1|} diff --git a/tests/coverage/fn_sig_into_try.cov-map b/tests/coverage/fn_sig_into_try.cov-map index fc57a4892be4e..acf6e21646bd5 100644 --- a/tests/coverage/fn_sig_into_try.cov-map +++ b/tests/coverage/fn_sig_into_try.cov-map @@ -37,14 +37,13 @@ Number of file 0 mappings: 5 Highest counter ID seen: c0 Function name: fn_sig_into_try::d -Raw bytes (39): 0x[01, 01, 00, 07, 01, 1f, 01, 00, 16, 01, 03, 0c, 00, 0e, 01, 00, 11, 00, 13, 01, 01, 05, 00, 0f, 00, 00, 0f, 00, 10, 01, 01, 05, 00, 0c, 01, 01, 01, 00, 02] +Raw bytes (34): 0x[01, 01, 00, 06, 01, 1f, 01, 00, 16, 01, 03, 11, 00, 13, 01, 01, 05, 00, 0f, 00, 00, 0f, 00, 10, 01, 01, 05, 00, 0c, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/fn_sig_into_try.rs Number of expressions: 0 -Number of file 0 mappings: 7 +Number of file 0 mappings: 6 - Code(Counter(0)) at (prev + 31, 1) to (start + 0, 22) -- Code(Counter(0)) at (prev + 3, 12) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 19) +- Code(Counter(0)) at (prev + 3, 17) to (start + 0, 19) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15) - Code(Zero) at (prev + 0, 15) to (start + 0, 16) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 12) diff --git a/tests/coverage/for.many.coverage b/tests/coverage/for.many.coverage index c6908b64cd615..5f57e3ee600a6 100644 --- a/tests/coverage/for.many.coverage +++ b/tests/coverage/for.many.coverage @@ -9,13 +9,11 @@ LL| 1|fn for_loop(items: &[&str]) { LL| 1| say("hello"); LL| | - LL| 3| for item in items { - ^1 + LL| 1| for item in items { LL| 3| say(item); - LL| 3| } + LL| | } LL| | - LL| 3| for item in items { - ^1 + LL| 1| for item in items { LL| 3| say(item) LL| | } LL| | diff --git a/tests/coverage/for.one.coverage b/tests/coverage/for.one.coverage index 285d379c526f9..838ad89ab9c35 100644 --- a/tests/coverage/for.one.coverage +++ b/tests/coverage/for.one.coverage @@ -11,7 +11,7 @@ LL| | LL| 1| for item in items { LL| 1| say(item); - LL| 1| } + LL| | } LL| | LL| 1| for item in items { LL| 1| say(item) diff --git a/tests/coverage/for.zero.cov-map b/tests/coverage/for.zero.cov-map index 4ac461b85719f..4081e64394656 100644 --- a/tests/coverage/for.zero.cov-map +++ b/tests/coverage/for.zero.cov-map @@ -1,30 +1,20 @@ Function name: for::for_loop -Raw bytes (77): 0x[01, 01, 04, 05, 01, 09, 01, 09, 01, 09, 01, 0d, 01, 09, 01, 00, 1c, 01, 01, 05, 00, 08, 01, 00, 09, 00, 10, 02, 02, 09, 00, 0d, 01, 00, 11, 00, 16, 02, 00, 17, 02, 06, 0e, 04, 09, 00, 0d, 01, 00, 11, 00, 16, 0e, 01, 09, 00, 0c, 0e, 00, 0d, 00, 11, 01, 03, 05, 00, 08, 01, 00, 09, 00, 12, 01, 01, 01, 00, 02] +Raw bytes (48): 0x[01, 01, 02, 05, 01, 09, 01, 08, 01, 09, 01, 00, 1c, 01, 01, 05, 00, 11, 01, 02, 11, 00, 16, 02, 01, 09, 00, 12, 01, 03, 11, 00, 16, 06, 01, 09, 00, 12, 01, 03, 05, 00, 13, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/for.rs -Number of expressions: 4 +Number of expressions: 2 - expression 0 operands: lhs = Counter(1), rhs = Counter(0) - expression 1 operands: lhs = Counter(2), rhs = Counter(0) -- expression 2 operands: lhs = Counter(2), rhs = Counter(0) -- expression 3 operands: lhs = Counter(2), rhs = Counter(0) -Number of file 0 mappings: 13 +Number of file 0 mappings: 8 - Code(Counter(0)) at (prev + 9, 1) to (start + 0, 28) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 8) -- Code(Counter(0)) at (prev + 0, 9) to (start + 0, 16) -- Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 13) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 17) +- Code(Counter(0)) at (prev + 2, 17) to (start + 0, 22) +- Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 18) = (c1 - c0) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 22) -- Code(Expression(0, Sub)) at (prev + 0, 23) to (start + 2, 6) - = (c1 - c0) -- Code(Expression(3, Sub)) at (prev + 4, 9) to (start + 0, 13) - = (c2 - c0) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 22) -- Code(Expression(3, Sub)) at (prev + 1, 9) to (start + 0, 12) - = (c2 - c0) -- Code(Expression(3, Sub)) at (prev + 0, 13) to (start + 0, 17) +- Code(Counter(0)) at (prev + 3, 17) to (start + 0, 22) +- Code(Expression(1, Sub)) at (prev + 1, 9) to (start + 0, 18) = (c2 - c0) -- Code(Counter(0)) at (prev + 3, 5) to (start + 0, 8) -- Code(Counter(0)) at (prev + 0, 9) to (start + 0, 18) +- Code(Counter(0)) at (prev + 3, 5) to (start + 0, 19) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/for.zero.coverage b/tests/coverage/for.zero.coverage index 9376a371275d4..8b787ba6eae4d 100644 --- a/tests/coverage/for.zero.coverage +++ b/tests/coverage/for.zero.coverage @@ -10,12 +10,10 @@ LL| 1| say("hello"); LL| | LL| 1| for item in items { - ^0 LL| 0| say(item); - LL| 0| } + LL| | } LL| | LL| 1| for item in items { - ^0 LL| 0| say(item) LL| | } LL| | diff --git a/tests/coverage/generic-unused-impl.cov-map b/tests/coverage/generic-unused-impl.cov-map index da9e5495a72b0..be7a0cface6a9 100644 --- a/tests/coverage/generic-unused-impl.cov-map +++ b/tests/coverage/generic-unused-impl.cov-map @@ -1,12 +1,11 @@ Function name: as core::convert::From<[<_ as generic_unused_impl::Foo>::Assoc; 1]>>::from (unused) -Raw bytes (29): 0x[01, 01, 00, 05, 00, 0b, 05, 00, 29, 00, 01, 0e, 00, 12, 00, 00, 16, 00, 1a, 00, 01, 09, 00, 1b, 00, 01, 05, 00, 06] +Raw bytes (24): 0x[01, 01, 00, 04, 00, 0b, 05, 00, 29, 00, 01, 16, 00, 1a, 00, 01, 09, 00, 1b, 00, 01, 05, 00, 06] Number of files: 1 - file 0 => $DIR/generic-unused-impl.rs Number of expressions: 0 -Number of file 0 mappings: 5 +Number of file 0 mappings: 4 - Code(Zero) at (prev + 11, 5) to (start + 0, 41) -- Code(Zero) at (prev + 1, 14) to (start + 0, 18) -- Code(Zero) at (prev + 0, 22) to (start + 0, 26) +- Code(Zero) at (prev + 1, 22) to (start + 0, 26) - Code(Zero) at (prev + 1, 9) to (start + 0, 27) - Code(Zero) at (prev + 1, 5) to (start + 0, 6) Highest counter ID seen: (none) diff --git a/tests/coverage/holes.cov-map b/tests/coverage/holes.cov-map index c2158c4415068..c850a9965fdd2 100644 --- a/tests/coverage/holes.cov-map +++ b/tests/coverage/holes.cov-map @@ -9,40 +9,25 @@ Number of file 0 mappings: 2 Highest counter ID seen: (none) Function name: holes::main -Raw bytes (154): 0x[01, 01, 00, 1e, 01, 08, 01, 00, 0a, 01, 01, 05, 00, 0e, 01, 00, 0f, 00, 11, 01, 04, 05, 00, 0e, 01, 00, 0f, 00, 11, 01, 07, 09, 00, 11, 01, 09, 05, 00, 0e, 01, 00, 0f, 00, 11, 01, 04, 05, 00, 0e, 01, 00, 0f, 00, 11, 01, 07, 05, 00, 0e, 01, 00, 0f, 00, 11, 01, 06, 05, 00, 0e, 01, 00, 0f, 00, 11, 01, 04, 05, 00, 0e, 01, 00, 0f, 00, 11, 01, 04, 05, 00, 0e, 01, 00, 0f, 00, 11, 01, 06, 05, 00, 0e, 01, 00, 0f, 00, 11, 01, 03, 09, 00, 0f, 01, 07, 05, 00, 0e, 01, 00, 0f, 00, 11, 01, 03, 09, 00, 0f, 01, 07, 05, 00, 0e, 01, 00, 0f, 00, 11, 01, 06, 09, 00, 27, 01, 0d, 05, 00, 0e, 01, 00, 0f, 00, 11, 01, 01, 01, 00, 02] +Raw bytes (79): 0x[01, 01, 00, 0f, 01, 08, 01, 00, 0a, 01, 01, 05, 00, 12, 01, 04, 05, 00, 12, 01, 10, 05, 00, 12, 01, 04, 05, 00, 12, 01, 07, 05, 00, 12, 01, 06, 05, 00, 12, 01, 04, 05, 00, 12, 01, 04, 05, 00, 12, 01, 06, 05, 00, 12, 01, 0a, 05, 00, 12, 01, 0a, 05, 00, 12, 01, 08, 0d, 00, 0e, 01, 0b, 05, 00, 12, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/holes.rs Number of expressions: 0 -Number of file 0 mappings: 30 +Number of file 0 mappings: 15 - Code(Counter(0)) at (prev + 8, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 17) -- Code(Counter(0)) at (prev + 4, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 17) -- Code(Counter(0)) at (prev + 7, 9) to (start + 0, 17) -- Code(Counter(0)) at (prev + 9, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 17) -- Code(Counter(0)) at (prev + 4, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 17) -- Code(Counter(0)) at (prev + 7, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 17) -- Code(Counter(0)) at (prev + 6, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 17) -- Code(Counter(0)) at (prev + 4, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 17) -- Code(Counter(0)) at (prev + 4, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 17) -- Code(Counter(0)) at (prev + 6, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 17) -- Code(Counter(0)) at (prev + 3, 9) to (start + 0, 15) -- Code(Counter(0)) at (prev + 7, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 17) -- Code(Counter(0)) at (prev + 3, 9) to (start + 0, 15) -- Code(Counter(0)) at (prev + 7, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 17) -- Code(Counter(0)) at (prev + 6, 9) to (start + 0, 39) -- Code(Counter(0)) at (prev + 13, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 17) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 18) +- Code(Counter(0)) at (prev + 4, 5) to (start + 0, 18) +- Code(Counter(0)) at (prev + 16, 5) to (start + 0, 18) +- Code(Counter(0)) at (prev + 4, 5) to (start + 0, 18) +- Code(Counter(0)) at (prev + 7, 5) to (start + 0, 18) +- Code(Counter(0)) at (prev + 6, 5) to (start + 0, 18) +- Code(Counter(0)) at (prev + 4, 5) to (start + 0, 18) +- Code(Counter(0)) at (prev + 4, 5) to (start + 0, 18) +- Code(Counter(0)) at (prev + 6, 5) to (start + 0, 18) +- Code(Counter(0)) at (prev + 10, 5) to (start + 0, 18) +- Code(Counter(0)) at (prev + 10, 5) to (start + 0, 18) +- Code(Counter(0)) at (prev + 8, 13) to (start + 0, 14) +- Code(Counter(0)) at (prev + 11, 5) to (start + 0, 18) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 @@ -57,14 +42,13 @@ Number of file 0 mappings: 2 Highest counter ID seen: (none) Function name: holes::main::{closure#0} (unused) -Raw bytes (24): 0x[01, 01, 00, 04, 00, 18, 09, 00, 0a, 00, 01, 0d, 00, 16, 00, 00, 17, 00, 19, 00, 01, 09, 00, 0a] +Raw bytes (19): 0x[01, 01, 00, 03, 00, 18, 09, 00, 0a, 00, 01, 0d, 00, 1a, 00, 01, 09, 00, 0a] Number of files: 1 - file 0 => $DIR/holes.rs Number of expressions: 0 -Number of file 0 mappings: 4 +Number of file 0 mappings: 3 - Code(Zero) at (prev + 24, 9) to (start + 0, 10) -- Code(Zero) at (prev + 1, 13) to (start + 0, 22) -- Code(Zero) at (prev + 0, 23) to (start + 0, 25) +- Code(Zero) at (prev + 1, 13) to (start + 0, 26) - Code(Zero) at (prev + 1, 9) to (start + 0, 10) Highest counter ID seen: (none) diff --git a/tests/coverage/holes.coverage b/tests/coverage/holes.coverage index 1ea60491800d0..7ef26c68c5919 100644 --- a/tests/coverage/holes.coverage +++ b/tests/coverage/holes.coverage @@ -17,7 +17,7 @@ LL| | // Splitting this across multiple lines makes it easier to see where the LL| | // coverage mapping regions begin and end. LL| | #[rustfmt::skip] - LL| 1| let _closure = + LL| | let _closure = LL| | | LL| | _arg: (), LL| | | @@ -60,7 +60,7 @@ LL| 1| black_box(()); LL| | LL| | #[rustfmt::skip] - LL| 1| let _const = + LL| | let _const = LL| | const LL| | { LL| | 7 + 4 @@ -70,7 +70,7 @@ LL| 1| black_box(()); LL| | LL| | #[rustfmt::skip] - LL| 1| let _async = + LL| | let _async = LL| | async LL| 0| { LL| 0| 7 + 4 @@ -83,9 +83,9 @@ LL| | // such as the length of an array literal. Handling this case requires LL| | // `nested_filter::OnlyBodies` or equivalent. LL| | #[rustfmt::skip] - LL| 1| let _const_block_inside_anon_const = + LL| | let _const_block_inside_anon_const = LL| | [ - LL| | 0 + LL| 1| 0 LL| | ; LL| | 7 LL| | + diff --git a/tests/coverage/if-let-chain.none.cov-map b/tests/coverage/if-let-chain.none.cov-map index 9626b6cc8553b..b14ac721dc700 100644 --- a/tests/coverage/if-let-chain.none.cov-map +++ b/tests/coverage/if-let-chain.none.cov-map @@ -1,40 +1,29 @@ Function name: if_let_chain::if_let_chain -Raw bytes (105): 0x[01, 01, 08, 09, 05, 0b, 09, 01, 05, 11, 0d, 11, 0d, 11, 0d, 1f, 11, 01, 0d, 11, 01, 09, 01, 00, 33, 09, 01, 11, 00, 18, 01, 00, 1c, 00, 27, 02, 01, 15, 00, 18, 09, 00, 1c, 00, 23, 02, 01, 05, 02, 06, 06, 02, 05, 00, 06, 11, 02, 11, 00, 18, 01, 00, 1c, 00, 27, 16, 01, 15, 00, 18, 11, 00, 1c, 00, 23, 16, 02, 09, 00, 0c, 16, 00, 0d, 00, 10, 1a, 01, 05, 00, 06, 01, 02, 05, 00, 08, 01, 00, 09, 00, 12, 01, 01, 01, 00, 02] +Raw bytes (71): 0x[01, 01, 06, 09, 05, 0b, 09, 01, 05, 11, 0d, 17, 11, 01, 0d, 0b, 01, 09, 01, 00, 33, 01, 01, 08, 00, 27, 09, 01, 0c, 00, 23, 02, 02, 09, 00, 11, 06, 01, 05, 00, 06, 01, 02, 08, 00, 27, 11, 01, 0c, 00, 23, 0e, 02, 09, 00, 11, 12, 01, 05, 00, 06, 01, 02, 05, 00, 13, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/if-let-chain.rs -Number of expressions: 8 +Number of expressions: 6 - expression 0 operands: lhs = Counter(2), rhs = Counter(1) - expression 1 operands: lhs = Expression(2, Add), rhs = Counter(2) - expression 2 operands: lhs = Counter(0), rhs = Counter(1) - expression 3 operands: lhs = Counter(4), rhs = Counter(3) -- expression 4 operands: lhs = Counter(4), rhs = Counter(3) -- expression 5 operands: lhs = Counter(4), rhs = Counter(3) -- expression 6 operands: lhs = Expression(7, Add), rhs = Counter(4) -- expression 7 operands: lhs = Counter(0), rhs = Counter(3) -Number of file 0 mappings: 17 +- expression 4 operands: lhs = Expression(5, Add), rhs = Counter(4) +- expression 5 operands: lhs = Counter(0), rhs = Counter(3) +Number of file 0 mappings: 11 - Code(Counter(0)) at (prev + 9, 1) to (start + 0, 51) -- Code(Counter(2)) at (prev + 1, 17) to (start + 0, 24) -- Code(Counter(0)) at (prev + 0, 28) to (start + 0, 39) -- Code(Expression(0, Sub)) at (prev + 1, 21) to (start + 0, 24) +- Code(Counter(0)) at (prev + 1, 8) to (start + 0, 39) +- Code(Counter(2)) at (prev + 1, 12) to (start + 0, 35) +- Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 17) = (c2 - c1) -- Code(Counter(2)) at (prev + 0, 28) to (start + 0, 35) -- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 2, 6) - = (c2 - c1) -- Code(Expression(1, Sub)) at (prev + 2, 5) to (start + 0, 6) +- Code(Expression(1, Sub)) at (prev + 1, 5) to (start + 0, 6) = ((c0 + c1) - c2) -- Code(Counter(4)) at (prev + 2, 17) to (start + 0, 24) -- Code(Counter(0)) at (prev + 0, 28) to (start + 0, 39) -- Code(Expression(5, Sub)) at (prev + 1, 21) to (start + 0, 24) - = (c4 - c3) -- Code(Counter(4)) at (prev + 0, 28) to (start + 0, 35) -- Code(Expression(5, Sub)) at (prev + 2, 9) to (start + 0, 12) - = (c4 - c3) -- Code(Expression(5, Sub)) at (prev + 0, 13) to (start + 0, 16) +- Code(Counter(0)) at (prev + 2, 8) to (start + 0, 39) +- Code(Counter(4)) at (prev + 1, 12) to (start + 0, 35) +- Code(Expression(3, Sub)) at (prev + 2, 9) to (start + 0, 17) = (c4 - c3) -- Code(Expression(6, Sub)) at (prev + 1, 5) to (start + 0, 6) +- Code(Expression(4, Sub)) at (prev + 1, 5) to (start + 0, 6) = ((c0 + c3) - c4) -- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 8) -- Code(Counter(0)) at (prev + 0, 9) to (start + 0, 18) +- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 19) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c4 diff --git a/tests/coverage/if-let-chain.none.coverage b/tests/coverage/if-let-chain.none.coverage index a5aba75201ead..5fed7916fc571 100644 --- a/tests/coverage/if-let-chain.none.coverage +++ b/tests/coverage/if-let-chain.none.coverage @@ -8,14 +8,12 @@ LL| | LL| 1|fn if_let_chain(opt_opt_msg: Option>) { LL| 1| if let Some(opt_msg) = opt_opt_msg - ^0 LL| 0| && let Some(msg) = opt_msg - LL| 0| { + LL| | { LL| 0| say(msg); LL| 1| } LL| | LL| 1| if let Some(opt_msg) = opt_opt_msg - ^0 LL| 0| && let Some(msg) = opt_msg LL| | { LL| 0| say(msg) diff --git a/tests/coverage/if-let-chain.one.coverage b/tests/coverage/if-let-chain.one.coverage index b4789e8593af6..e1008f697e6e1 100644 --- a/tests/coverage/if-let-chain.one.coverage +++ b/tests/coverage/if-let-chain.one.coverage @@ -9,14 +9,12 @@ LL| 1|fn if_let_chain(opt_opt_msg: Option>) { LL| 1| if let Some(opt_msg) = opt_opt_msg LL| 1| && let Some(msg) = opt_msg - ^0 - LL| 0| { + LL| | { LL| 0| say(msg); LL| 1| } LL| | LL| 1| if let Some(opt_msg) = opt_opt_msg LL| 1| && let Some(msg) = opt_msg - ^0 LL| | { LL| 0| say(msg) LL| 1| } diff --git a/tests/coverage/if-let-chain.two.coverage b/tests/coverage/if-let-chain.two.coverage index 491a704da1289..215c8627597f7 100644 --- a/tests/coverage/if-let-chain.two.coverage +++ b/tests/coverage/if-let-chain.two.coverage @@ -9,10 +9,9 @@ LL| 1|fn if_let_chain(opt_opt_msg: Option>) { LL| 1| if let Some(opt_msg) = opt_opt_msg LL| 1| && let Some(msg) = opt_msg - LL| 1| { + LL| | { LL| 1| say(msg); - LL| 1| } - ^0 + LL| 0| } LL| | LL| 1| if let Some(opt_msg) = opt_opt_msg LL| 1| && let Some(msg) = opt_msg diff --git a/tests/coverage/if-tail-expr.no.cov-map b/tests/coverage/if-tail-expr.no.cov-map index 3849ec62daae8..723914835e79f 100644 --- a/tests/coverage/if-tail-expr.no.cov-map +++ b/tests/coverage/if-tail-expr.no.cov-map @@ -1,45 +1,32 @@ Function name: if_tail_expr::if_true -Raw bytes (135): 0x[01, 01, 08, 01, 05, 01, 09, 01, 09, 01, 0d, 01, 1f, 0d, 11, 01, 1f, 0d, 11, 17, 01, 09, 01, 00, 24, 01, 01, 05, 00, 08, 01, 00, 09, 00, 10, 01, 02, 08, 00, 0c, 05, 01, 09, 00, 0c, 05, 00, 0d, 00, 13, 02, 01, 05, 00, 06, 01, 02, 08, 00, 0c, 09, 01, 09, 00, 0c, 09, 00, 0d, 00, 13, 0a, 02, 09, 00, 0c, 0a, 00, 0d, 00, 14, 01, 03, 08, 00, 0c, 0d, 01, 09, 00, 0c, 0d, 00, 0d, 00, 13, 0e, 01, 0f, 00, 14, 11, 01, 09, 00, 0c, 11, 00, 0d, 00, 14, 1a, 02, 09, 00, 0c, 1a, 00, 0d, 00, 16, 01, 03, 05, 00, 08, 01, 00, 09, 00, 12, 01, 01, 01, 00, 02] +Raw bytes (89): 0x[01, 01, 05, 01, 05, 01, 09, 01, 0d, 01, 13, 0d, 11, 0f, 01, 09, 01, 00, 24, 01, 01, 05, 00, 11, 01, 02, 08, 00, 0c, 05, 01, 09, 00, 14, 02, 01, 05, 00, 06, 01, 02, 08, 00, 0c, 09, 01, 09, 00, 14, 06, 02, 09, 00, 15, 01, 03, 08, 00, 0c, 0d, 01, 09, 00, 14, 0a, 01, 0f, 00, 14, 11, 01, 09, 00, 15, 0e, 02, 09, 00, 17, 01, 03, 05, 00, 13, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/if-tail-expr.rs -Number of expressions: 8 +Number of expressions: 5 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) - expression 1 operands: lhs = Counter(0), rhs = Counter(2) -- expression 2 operands: lhs = Counter(0), rhs = Counter(2) -- expression 3 operands: lhs = Counter(0), rhs = Counter(3) -- expression 4 operands: lhs = Counter(0), rhs = Expression(7, Add) -- expression 5 operands: lhs = Counter(3), rhs = Counter(4) -- expression 6 operands: lhs = Counter(0), rhs = Expression(7, Add) -- expression 7 operands: lhs = Counter(3), rhs = Counter(4) -Number of file 0 mappings: 23 +- expression 2 operands: lhs = Counter(0), rhs = Counter(3) +- expression 3 operands: lhs = Counter(0), rhs = Expression(4, Add) +- expression 4 operands: lhs = Counter(3), rhs = Counter(4) +Number of file 0 mappings: 15 - Code(Counter(0)) at (prev + 9, 1) to (start + 0, 36) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 8) -- Code(Counter(0)) at (prev + 0, 9) to (start + 0, 16) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 17) - Code(Counter(0)) at (prev + 2, 8) to (start + 0, 12) -- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 12) -- Code(Counter(1)) at (prev + 0, 13) to (start + 0, 19) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 20) - Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 6) = (c0 - c1) - Code(Counter(0)) at (prev + 2, 8) to (start + 0, 12) -- Code(Counter(2)) at (prev + 1, 9) to (start + 0, 12) -- Code(Counter(2)) at (prev + 0, 13) to (start + 0, 19) -- Code(Expression(2, Sub)) at (prev + 2, 9) to (start + 0, 12) - = (c0 - c2) -- Code(Expression(2, Sub)) at (prev + 0, 13) to (start + 0, 20) +- Code(Counter(2)) at (prev + 1, 9) to (start + 0, 20) +- Code(Expression(1, Sub)) at (prev + 2, 9) to (start + 0, 21) = (c0 - c2) - Code(Counter(0)) at (prev + 3, 8) to (start + 0, 12) -- Code(Counter(3)) at (prev + 1, 9) to (start + 0, 12) -- Code(Counter(3)) at (prev + 0, 13) to (start + 0, 19) -- Code(Expression(3, Sub)) at (prev + 1, 15) to (start + 0, 20) +- Code(Counter(3)) at (prev + 1, 9) to (start + 0, 20) +- Code(Expression(2, Sub)) at (prev + 1, 15) to (start + 0, 20) = (c0 - c3) -- Code(Counter(4)) at (prev + 1, 9) to (start + 0, 12) -- Code(Counter(4)) at (prev + 0, 13) to (start + 0, 20) -- Code(Expression(6, Sub)) at (prev + 2, 9) to (start + 0, 12) - = (c0 - (c3 + c4)) -- Code(Expression(6, Sub)) at (prev + 0, 13) to (start + 0, 22) +- Code(Counter(4)) at (prev + 1, 9) to (start + 0, 21) +- Code(Expression(3, Sub)) at (prev + 2, 9) to (start + 0, 23) = (c0 - (c3 + c4)) -- Code(Counter(0)) at (prev + 3, 5) to (start + 0, 8) -- Code(Counter(0)) at (prev + 0, 9) to (start + 0, 18) +- Code(Counter(0)) at (prev + 3, 5) to (start + 0, 19) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c4 diff --git a/tests/coverage/if-tail-stmt.no.cov-map b/tests/coverage/if-tail-stmt.no.cov-map index e5721e2dc4a74..adb26e95bd7b4 100644 --- a/tests/coverage/if-tail-stmt.no.cov-map +++ b/tests/coverage/if-tail-stmt.no.cov-map @@ -1,5 +1,5 @@ Function name: if_tail_stmt::if_true -Raw bytes (99): 0x[01, 01, 05, 01, 05, 01, 09, 01, 0d, 01, 13, 0d, 11, 11, 01, 09, 01, 00, 24, 01, 01, 05, 00, 08, 01, 00, 09, 00, 10, 01, 02, 08, 00, 0c, 05, 00, 0d, 02, 06, 02, 02, 05, 00, 06, 01, 02, 08, 00, 0c, 09, 00, 0d, 02, 06, 06, 02, 0c, 02, 06, 01, 04, 08, 00, 0c, 0d, 00, 0d, 02, 06, 0a, 02, 0f, 00, 14, 11, 00, 15, 02, 06, 0e, 02, 0c, 02, 06, 01, 04, 05, 00, 08, 01, 00, 09, 00, 12, 01, 01, 01, 00, 02] +Raw bytes (89): 0x[01, 01, 05, 01, 05, 01, 09, 01, 0d, 01, 13, 0d, 11, 0f, 01, 09, 01, 00, 24, 01, 01, 05, 00, 11, 01, 02, 08, 00, 0c, 05, 01, 09, 00, 14, 02, 01, 05, 00, 06, 01, 02, 08, 00, 0c, 09, 01, 09, 00, 14, 06, 02, 09, 00, 15, 01, 03, 08, 00, 0c, 0d, 01, 09, 00, 14, 0a, 01, 0f, 00, 14, 11, 01, 09, 00, 15, 0e, 02, 09, 00, 17, 01, 03, 05, 00, 13, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/if-tail-stmt.rs Number of expressions: 5 @@ -8,27 +8,25 @@ Number of expressions: 5 - expression 2 operands: lhs = Counter(0), rhs = Counter(3) - expression 3 operands: lhs = Counter(0), rhs = Expression(4, Add) - expression 4 operands: lhs = Counter(3), rhs = Counter(4) -Number of file 0 mappings: 17 +Number of file 0 mappings: 15 - Code(Counter(0)) at (prev + 9, 1) to (start + 0, 36) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 8) -- Code(Counter(0)) at (prev + 0, 9) to (start + 0, 16) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 17) - Code(Counter(0)) at (prev + 2, 8) to (start + 0, 12) -- Code(Counter(1)) at (prev + 0, 13) to (start + 2, 6) -- Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 6) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 20) +- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 6) = (c0 - c1) - Code(Counter(0)) at (prev + 2, 8) to (start + 0, 12) -- Code(Counter(2)) at (prev + 0, 13) to (start + 2, 6) -- Code(Expression(1, Sub)) at (prev + 2, 12) to (start + 2, 6) +- Code(Counter(2)) at (prev + 1, 9) to (start + 0, 20) +- Code(Expression(1, Sub)) at (prev + 2, 9) to (start + 0, 21) = (c0 - c2) -- Code(Counter(0)) at (prev + 4, 8) to (start + 0, 12) -- Code(Counter(3)) at (prev + 0, 13) to (start + 2, 6) -- Code(Expression(2, Sub)) at (prev + 2, 15) to (start + 0, 20) +- Code(Counter(0)) at (prev + 3, 8) to (start + 0, 12) +- Code(Counter(3)) at (prev + 1, 9) to (start + 0, 20) +- Code(Expression(2, Sub)) at (prev + 1, 15) to (start + 0, 20) = (c0 - c3) -- Code(Counter(4)) at (prev + 0, 21) to (start + 2, 6) -- Code(Expression(3, Sub)) at (prev + 2, 12) to (start + 2, 6) +- Code(Counter(4)) at (prev + 1, 9) to (start + 0, 21) +- Code(Expression(3, Sub)) at (prev + 2, 9) to (start + 0, 23) = (c0 - (c3 + c4)) -- Code(Counter(0)) at (prev + 4, 5) to (start + 0, 8) -- Code(Counter(0)) at (prev + 0, 9) to (start + 0, 18) +- Code(Counter(0)) at (prev + 3, 5) to (start + 0, 19) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c4 diff --git a/tests/coverage/if-tail-stmt.no.coverage b/tests/coverage/if-tail-stmt.no.coverage index ca311f21ff229..d65ad735f8f5e 100644 --- a/tests/coverage/if-tail-stmt.no.coverage +++ b/tests/coverage/if-tail-stmt.no.coverage @@ -15,17 +15,17 @@ LL| | LL| 1| if cond { LL| 0| say("true"); - LL| 1| } else { + LL| | } else { LL| 1| say("false"); - LL| 1| } + LL| | } LL| | LL| 1| if cond { LL| 0| say("cond"); LL| 1| } else if other { LL| 1| say("other"); - LL| 1| } else { + LL| | } else { LL| 0| say("neither"); - LL| 0| } + LL| | } LL| | LL| 1| say("goodbye"); LL| 1|} diff --git a/tests/coverage/if-tail-stmt.yes.coverage b/tests/coverage/if-tail-stmt.yes.coverage index b4fa1884315e6..c0ca8c3808791 100644 --- a/tests/coverage/if-tail-stmt.yes.coverage +++ b/tests/coverage/if-tail-stmt.yes.coverage @@ -11,23 +11,21 @@ LL| | LL| 1| if cond { LL| 1| say("true"); - LL| 1| } - ^0 + LL| 0| } LL| | LL| 1| if cond { LL| 1| say("true"); - LL| 1| } else { + LL| | } else { LL| 0| say("false"); - LL| 0| } + LL| | } LL| | LL| 1| if cond { LL| 1| say("cond"); - LL| 1| } else if other { - ^0 + LL| 0| } else if other { LL| 0| say("other"); - LL| 0| } else { + LL| | } else { LL| 0| say("neither"); - LL| 0| } + LL| | } LL| | LL| 1| say("goodbye"); LL| 1|} diff --git a/tests/coverage/if_not.cov-map b/tests/coverage/if_not.cov-map index 1b1a1b30e934f..a2b724e01e600 100644 --- a/tests/coverage/if_not.cov-map +++ b/tests/coverage/if_not.cov-map @@ -1,25 +1,34 @@ Function name: if_not::if_not -Raw bytes (65): 0x[01, 01, 03, 01, 05, 01, 09, 01, 0d, 0b, 01, 05, 01, 00, 16, 01, 02, 09, 01, 0d, 02, 02, 05, 02, 06, 05, 02, 05, 00, 06, 01, 03, 09, 01, 0d, 06, 02, 05, 02, 06, 09, 02, 05, 00, 06, 01, 03, 09, 01, 0d, 0a, 02, 05, 02, 06, 0d, 02, 0c, 02, 06, 01, 03, 01, 00, 02] +Raw bytes (89): 0x[01, 01, 05, 01, 05, 01, 09, 01, 09, 01, 0d, 01, 0d, 0f, 01, 05, 01, 00, 16, 01, 02, 09, 01, 0d, 02, 03, 09, 00, 11, 02, 00, 12, 00, 22, 05, 01, 05, 00, 06, 01, 03, 09, 01, 0d, 0a, 03, 09, 00, 11, 0a, 00, 12, 00, 22, 09, 01, 05, 00, 06, 01, 03, 09, 01, 0d, 12, 03, 09, 00, 11, 12, 00, 12, 00, 22, 0d, 02, 09, 00, 11, 0d, 00, 12, 00, 21, 01, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/if_not.rs -Number of expressions: 3 +Number of expressions: 5 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) - expression 1 operands: lhs = Counter(0), rhs = Counter(2) -- expression 2 operands: lhs = Counter(0), rhs = Counter(3) -Number of file 0 mappings: 11 +- expression 2 operands: lhs = Counter(0), rhs = Counter(2) +- expression 3 operands: lhs = Counter(0), rhs = Counter(3) +- expression 4 operands: lhs = Counter(0), rhs = Counter(3) +Number of file 0 mappings: 15 - Code(Counter(0)) at (prev + 5, 1) to (start + 0, 22) - Code(Counter(0)) at (prev + 2, 9) to (start + 1, 13) -- Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 2, 6) +- Code(Expression(0, Sub)) at (prev + 3, 9) to (start + 0, 17) = (c0 - c1) -- Code(Counter(1)) at (prev + 2, 5) to (start + 0, 6) +- Code(Expression(0, Sub)) at (prev + 0, 18) to (start + 0, 34) + = (c0 - c1) +- Code(Counter(1)) at (prev + 1, 5) to (start + 0, 6) - Code(Counter(0)) at (prev + 3, 9) to (start + 1, 13) -- Code(Expression(1, Sub)) at (prev + 2, 5) to (start + 2, 6) +- Code(Expression(2, Sub)) at (prev + 3, 9) to (start + 0, 17) + = (c0 - c2) +- Code(Expression(2, Sub)) at (prev + 0, 18) to (start + 0, 34) = (c0 - c2) -- Code(Counter(2)) at (prev + 2, 5) to (start + 0, 6) +- Code(Counter(2)) at (prev + 1, 5) to (start + 0, 6) - Code(Counter(0)) at (prev + 3, 9) to (start + 1, 13) -- Code(Expression(2, Sub)) at (prev + 2, 5) to (start + 2, 6) +- Code(Expression(4, Sub)) at (prev + 3, 9) to (start + 0, 17) + = (c0 - c3) +- Code(Expression(4, Sub)) at (prev + 0, 18) to (start + 0, 34) = (c0 - c3) -- Code(Counter(3)) at (prev + 2, 12) to (start + 2, 6) -- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2) +- Code(Counter(3)) at (prev + 2, 9) to (start + 0, 17) +- Code(Counter(3)) at (prev + 0, 18) to (start + 0, 33) +- Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2) Highest counter ID seen: c3 diff --git a/tests/coverage/if_not.coverage b/tests/coverage/if_not.coverage index 8478e861a3aa2..227365b2b3242 100644 --- a/tests/coverage/if_not.coverage +++ b/tests/coverage/if_not.coverage @@ -6,25 +6,25 @@ LL| | if LL| 12| ! LL| 12| cond - LL| 4| { + LL| | { LL| 4| println!("cond was false"); LL| 8| } LL| | LL| | if LL| 12| ! LL| 12| cond - LL| 4| { + LL| | { LL| 4| println!("cond was false"); LL| 8| } LL| | LL| | if LL| 12| ! LL| 12| cond - LL| 4| { + LL| | { LL| 4| println!("cond was false"); - LL| 8| } else { + LL| | } else { LL| 8| println!("cond was true"); - LL| 8| } + LL| | } LL| 12|} LL| | LL| |#[coverage(off)] diff --git a/tests/coverage/iffy/abort.cov-map b/tests/coverage/iffy/abort.cov-map index b6bd0edebaaef..c135e0194e72c 100644 --- a/tests/coverage/iffy/abort.cov-map +++ b/tests/coverage/iffy/abort.cov-map @@ -1,5 +1,5 @@ Function name: abort::main -Raw bytes (98): 0x[01, 01, 07, 05, 01, 05, 0b, 01, 09, 05, 13, 01, 0d, 05, 1b, 01, 11, 10, 01, 0d, 01, 00, 1c, 01, 01, 09, 00, 16, 01, 00, 19, 00, 1b, 05, 01, 0b, 00, 18, 02, 01, 0c, 00, 19, 09, 00, 1a, 02, 0a, 06, 02, 09, 00, 0a, 02, 02, 0c, 00, 19, 0d, 00, 1a, 00, 31, 0e, 00, 30, 00, 31, 02, 04, 0c, 00, 19, 11, 00, 1a, 00, 31, 16, 00, 30, 00, 31, 02, 01, 09, 00, 17, 01, 02, 05, 00, 0b, 01, 01, 01, 00, 02] +Raw bytes (93): 0x[01, 01, 07, 05, 01, 05, 0b, 01, 09, 05, 13, 01, 0d, 05, 1b, 01, 11, 0f, 01, 0d, 01, 00, 1c, 01, 01, 19, 00, 1b, 05, 01, 0b, 00, 18, 02, 01, 0c, 00, 19, 09, 01, 0d, 00, 1f, 06, 01, 09, 00, 0a, 02, 02, 0c, 00, 19, 0d, 00, 1c, 00, 2e, 0e, 00, 30, 00, 31, 02, 04, 0c, 00, 19, 11, 00, 1c, 00, 2e, 16, 00, 30, 00, 31, 02, 01, 09, 00, 17, 01, 02, 05, 00, 0b, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/abort.rs Number of expressions: 7 @@ -10,24 +10,23 @@ Number of expressions: 7 - expression 4 operands: lhs = Counter(0), rhs = Counter(3) - expression 5 operands: lhs = Counter(1), rhs = Expression(6, Add) - expression 6 operands: lhs = Counter(0), rhs = Counter(4) -Number of file 0 mappings: 16 +Number of file 0 mappings: 15 - Code(Counter(0)) at (prev + 13, 1) to (start + 0, 28) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 22) -- Code(Counter(0)) at (prev + 0, 25) to (start + 0, 27) +- Code(Counter(0)) at (prev + 1, 25) to (start + 0, 27) - Code(Counter(1)) at (prev + 1, 11) to (start + 0, 24) - Code(Expression(0, Sub)) at (prev + 1, 12) to (start + 0, 25) = (c1 - c0) -- Code(Counter(2)) at (prev + 0, 26) to (start + 2, 10) -- Code(Expression(1, Sub)) at (prev + 2, 9) to (start + 0, 10) +- Code(Counter(2)) at (prev + 1, 13) to (start + 0, 31) +- Code(Expression(1, Sub)) at (prev + 1, 9) to (start + 0, 10) = (c1 - (c0 + c2)) - Code(Expression(0, Sub)) at (prev + 2, 12) to (start + 0, 25) = (c1 - c0) -- Code(Counter(3)) at (prev + 0, 26) to (start + 0, 49) +- Code(Counter(3)) at (prev + 0, 28) to (start + 0, 46) - Code(Expression(3, Sub)) at (prev + 0, 48) to (start + 0, 49) = (c1 - (c0 + c3)) - Code(Expression(0, Sub)) at (prev + 4, 12) to (start + 0, 25) = (c1 - c0) -- Code(Counter(4)) at (prev + 0, 26) to (start + 0, 49) +- Code(Counter(4)) at (prev + 0, 28) to (start + 0, 46) - Code(Expression(5, Sub)) at (prev + 0, 48) to (start + 0, 49) = (c1 - (c0 + c4)) - Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 23) @@ -37,19 +36,22 @@ Number of file 0 mappings: 16 Highest counter ID seen: c4 Function name: abort::might_abort -Raw bytes (36): 0x[01, 01, 01, 01, 05, 06, 01, 03, 01, 00, 2e, 01, 01, 08, 00, 14, 05, 01, 09, 00, 11, 05, 01, 09, 00, 0f, 02, 01, 0c, 02, 06, 02, 03, 01, 00, 02] +Raw bytes (46): 0x[01, 01, 01, 01, 05, 08, 01, 03, 01, 00, 2e, 01, 01, 08, 00, 14, 05, 01, 09, 00, 11, 05, 00, 12, 00, 1f, 05, 01, 09, 00, 0f, 02, 02, 09, 00, 11, 02, 00, 12, 00, 1f, 02, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/abort.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 6 +Number of file 0 mappings: 8 - Code(Counter(0)) at (prev + 3, 1) to (start + 0, 46) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 20) - Code(Counter(1)) at (prev + 1, 9) to (start + 0, 17) +- Code(Counter(1)) at (prev + 0, 18) to (start + 0, 31) - Code(Counter(1)) at (prev + 1, 9) to (start + 0, 15) -- Code(Expression(0, Sub)) at (prev + 1, 12) to (start + 2, 6) +- Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 17) = (c0 - c1) -- Code(Expression(0, Sub)) at (prev + 3, 1) to (start + 0, 2) +- Code(Expression(0, Sub)) at (prev + 0, 18) to (start + 0, 31) + = (c0 - c1) +- Code(Expression(0, Sub)) at (prev + 2, 1) to (start + 0, 2) = (c0 - c1) Highest counter ID seen: c1 diff --git a/tests/coverage/iffy/abort.coverage b/tests/coverage/iffy/abort.coverage index be3dadab4878b..4926cdf86728b 100644 --- a/tests/coverage/iffy/abort.coverage +++ b/tests/coverage/iffy/abort.coverage @@ -4,9 +4,9 @@ LL| 12| if should_abort { LL| 0| println!("aborting..."); LL| 0| panic!("panics and aborts"); - LL| 12| } else { + LL| | } else { LL| 12| println!("Don't Panic"); - LL| 12| } + LL| | } LL| 12|} LL| | LL| |#[rustfmt::skip] @@ -18,12 +18,12 @@ LL| 6| } LL| | // See discussion (below the `Notes` section) on coverage results for the closing brace. LL| 10| if countdown < 5 { might_abort(false); } // Counts for different regions on one line. - ^4 ^6 + ^4 ^6 LL| | // For the following example, the closing brace is the last character on the line. LL| | // This shows the character after the closing brace is highlighted, even if that next LL| | // character is a newline. LL| 10| if countdown < 5 { might_abort(false); } - ^4 ^6 + ^4 ^6 LL| 10| countdown -= 1; LL| | } LL| 1| Ok(()) diff --git a/tests/coverage/iffy/assert.cov-map b/tests/coverage/iffy/assert.cov-map index 543ab89628281..1804c27df3238 100644 --- a/tests/coverage/iffy/assert.cov-map +++ b/tests/coverage/iffy/assert.cov-map @@ -1,5 +1,5 @@ Function name: assert::main -Raw bytes (76): 0x[01, 01, 06, 05, 01, 05, 17, 01, 09, 05, 13, 17, 0d, 01, 09, 0c, 01, 09, 01, 00, 1c, 01, 01, 09, 00, 16, 01, 00, 19, 00, 1b, 05, 01, 0b, 00, 18, 02, 01, 0c, 00, 1a, 09, 00, 1b, 02, 0a, 06, 02, 13, 00, 20, 0d, 00, 21, 02, 0a, 0e, 02, 09, 00, 0a, 02, 01, 09, 00, 17, 01, 02, 05, 00, 0b, 01, 01, 01, 00, 02] +Raw bytes (71): 0x[01, 01, 06, 05, 01, 05, 17, 01, 09, 05, 13, 17, 0d, 01, 09, 0b, 01, 09, 01, 00, 1c, 01, 01, 19, 00, 1b, 05, 01, 0b, 00, 18, 02, 01, 0c, 00, 1a, 09, 01, 0d, 00, 21, 06, 01, 13, 00, 20, 0d, 01, 0d, 00, 21, 0e, 01, 09, 00, 0a, 02, 01, 09, 00, 17, 01, 02, 05, 00, 0b, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/assert.rs Number of expressions: 6 @@ -9,18 +9,17 @@ Number of expressions: 6 - expression 3 operands: lhs = Counter(1), rhs = Expression(4, Add) - expression 4 operands: lhs = Expression(5, Add), rhs = Counter(3) - expression 5 operands: lhs = Counter(0), rhs = Counter(2) -Number of file 0 mappings: 12 +Number of file 0 mappings: 11 - Code(Counter(0)) at (prev + 9, 1) to (start + 0, 28) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 22) -- Code(Counter(0)) at (prev + 0, 25) to (start + 0, 27) +- Code(Counter(0)) at (prev + 1, 25) to (start + 0, 27) - Code(Counter(1)) at (prev + 1, 11) to (start + 0, 24) - Code(Expression(0, Sub)) at (prev + 1, 12) to (start + 0, 26) = (c1 - c0) -- Code(Counter(2)) at (prev + 0, 27) to (start + 2, 10) -- Code(Expression(1, Sub)) at (prev + 2, 19) to (start + 0, 32) +- Code(Counter(2)) at (prev + 1, 13) to (start + 0, 33) +- Code(Expression(1, Sub)) at (prev + 1, 19) to (start + 0, 32) = (c1 - (c0 + c2)) -- Code(Counter(3)) at (prev + 0, 33) to (start + 2, 10) -- Code(Expression(3, Sub)) at (prev + 2, 9) to (start + 0, 10) +- Code(Counter(3)) at (prev + 1, 13) to (start + 0, 33) +- Code(Expression(3, Sub)) at (prev + 1, 9) to (start + 0, 10) = (c1 - ((c0 + c2) + c3)) - Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 23) = (c1 - c0) @@ -29,14 +28,17 @@ Number of file 0 mappings: 12 Highest counter ID seen: c3 Function name: assert::might_fail_assert -Raw bytes (24): 0x[01, 01, 00, 04, 01, 04, 01, 00, 28, 01, 01, 05, 00, 0d, 01, 01, 05, 00, 0f, 05, 01, 01, 00, 02] +Raw bytes (39): 0x[01, 01, 00, 07, 01, 04, 01, 00, 28, 01, 01, 05, 00, 0d, 01, 00, 22, 00, 2e, 01, 01, 05, 00, 0f, 01, 00, 10, 00, 15, 01, 00, 17, 00, 23, 05, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/assert.rs Number of expressions: 0 -Number of file 0 mappings: 4 +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 4, 1) to (start + 0, 40) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 34) to (start + 0, 46) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15) +- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 21) +- Code(Counter(0)) at (prev + 0, 23) to (start + 0, 35) - Code(Counter(1)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c1 diff --git a/tests/coverage/iffy/closure.cov-map b/tests/coverage/iffy/closure.cov-map index d21be004594d8..e1954dc1ae862 100644 --- a/tests/coverage/iffy/closure.cov-map +++ b/tests/coverage/iffy/closure.cov-map @@ -1,67 +1,34 @@ Function name: closure::main -Raw bytes (311): 0x[01, 01, 01, 01, 05, 3d, 01, 09, 01, 00, 0a, 01, 04, 09, 00, 10, 01, 00, 13, 00, 2e, 01, 01, 09, 00, 11, 01, 00, 14, 00, 1c, 01, 02, 09, 00, 18, 01, 00, 1b, 00, 43, 01, 01, 05, 00, 0d, 01, 03, 09, 00, 14, 01, 02, 0d, 00, 1b, 01, 0d, 05, 00, 10, 01, 00, 13, 00, 3b, 01, 02, 09, 00, 0a, 01, 0a, 05, 00, 0d, 01, 03, 09, 00, 14, 01, 02, 0d, 00, 1b, 01, 02, 0d, 00, 0e, 01, 04, 05, 00, 10, 01, 00, 13, 00, 17, 01, 01, 05, 00, 0d, 01, 03, 09, 00, 14, 01, 02, 0d, 00, 1b, 01, 0d, 05, 00, 10, 01, 00, 13, 00, 17, 01, 02, 09, 00, 0a, 01, 0a, 05, 00, 0d, 01, 03, 09, 00, 14, 01, 02, 0d, 00, 1b, 01, 02, 0d, 00, 0e, 01, 05, 09, 00, 16, 01, 0a, 05, 00, 0d, 01, 03, 09, 00, 1a, 01, 01, 0e, 00, 12, 01, 01, 0e, 00, 11, 01, 02, 0d, 00, 1a, 01, 02, 0e, 00, 15, 01, 04, 09, 00, 18, 01, 0c, 09, 00, 16, 01, 00, 19, 00, 1b, 01, 01, 09, 00, 1e, 01, 03, 09, 00, 29, 01, 01, 09, 00, 2d, 01, 01, 09, 00, 24, 01, 05, 09, 00, 24, 01, 02, 09, 00, 21, 01, 04, 09, 00, 21, 01, 04, 09, 00, 28, 01, 09, 09, 00, 32, 01, 04, 09, 00, 33, 01, 07, 09, 00, 4b, 01, 08, 09, 00, 48, 01, 0a, 09, 00, 47, 01, 08, 09, 00, 44, 01, 0a, 08, 00, 10, 05, 00, 11, 04, 06, 05, 01, 09, 00, 30, 02, 03, 05, 00, 06, 01, 01, 05, 00, 28, 01, 01, 05, 00, 46, 01, 01, 05, 00, 43, 01, 01, 01, 00, 02] +Raw bytes (146): 0x[01, 01, 01, 01, 05, 1c, 01, 0a, 01, 00, 0a, 01, 04, 13, 00, 2e, 01, 01, 14, 00, 1c, 01, 02, 1b, 00, 43, 01, 01, 05, 00, 0d, 01, 03, 09, 00, 14, 01, 0f, 05, 00, 3b, 01, 00, 05, 00, 10, 01, 0c, 05, 00, 0d, 01, 03, 09, 05, 0a, 01, 08, 05, 00, 17, 01, 01, 05, 00, 0d, 01, 03, 09, 00, 14, 01, 0f, 05, 00, 17, 01, 0c, 05, 00, 0d, 01, 03, 09, 05, 0a, 01, 13, 05, 00, 0d, 01, 03, 09, 06, 21, 01, 16, 19, 00, 1b, 01, 4d, 08, 00, 10, 05, 01, 09, 00, 30, 05, 01, 09, 00, 4e, 05, 01, 09, 00, 4b, 02, 01, 05, 00, 06, 01, 01, 05, 00, 28, 01, 01, 05, 00, 46, 01, 01, 05, 00, 43, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/closure.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 61 -- Code(Counter(0)) at (prev + 9, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 4, 9) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 19) to (start + 0, 46) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 17) -- Code(Counter(0)) at (prev + 0, 20) to (start + 0, 28) -- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 24) -- Code(Counter(0)) at (prev + 0, 27) to (start + 0, 67) +Number of file 0 mappings: 28 +- Code(Counter(0)) at (prev + 10, 1) to (start + 0, 10) +- Code(Counter(0)) at (prev + 4, 19) to (start + 0, 46) +- Code(Counter(0)) at (prev + 1, 20) to (start + 0, 28) +- Code(Counter(0)) at (prev + 2, 27) to (start + 0, 67) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) - Code(Counter(0)) at (prev + 3, 9) to (start + 0, 20) -- Code(Counter(0)) at (prev + 2, 13) to (start + 0, 27) -- Code(Counter(0)) at (prev + 13, 5) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 19) to (start + 0, 59) -- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 10) -- Code(Counter(0)) at (prev + 10, 5) to (start + 0, 13) -- Code(Counter(0)) at (prev + 3, 9) to (start + 0, 20) -- Code(Counter(0)) at (prev + 2, 13) to (start + 0, 27) -- Code(Counter(0)) at (prev + 2, 13) to (start + 0, 14) -- Code(Counter(0)) at (prev + 4, 5) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 19) to (start + 0, 23) +- Code(Counter(0)) at (prev + 15, 5) to (start + 0, 59) +- Code(Counter(0)) at (prev + 0, 5) to (start + 0, 16) +- Code(Counter(0)) at (prev + 12, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 3, 9) to (start + 5, 10) +- Code(Counter(0)) at (prev + 8, 5) to (start + 0, 23) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) - Code(Counter(0)) at (prev + 3, 9) to (start + 0, 20) -- Code(Counter(0)) at (prev + 2, 13) to (start + 0, 27) -- Code(Counter(0)) at (prev + 13, 5) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 19) to (start + 0, 23) -- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 10) -- Code(Counter(0)) at (prev + 10, 5) to (start + 0, 13) -- Code(Counter(0)) at (prev + 3, 9) to (start + 0, 20) -- Code(Counter(0)) at (prev + 2, 13) to (start + 0, 27) -- Code(Counter(0)) at (prev + 2, 13) to (start + 0, 14) -- Code(Counter(0)) at (prev + 5, 9) to (start + 0, 22) -- Code(Counter(0)) at (prev + 10, 5) to (start + 0, 13) -- Code(Counter(0)) at (prev + 3, 9) to (start + 0, 26) -- Code(Counter(0)) at (prev + 1, 14) to (start + 0, 18) -- Code(Counter(0)) at (prev + 1, 14) to (start + 0, 17) -- Code(Counter(0)) at (prev + 2, 13) to (start + 0, 26) -- Code(Counter(0)) at (prev + 2, 14) to (start + 0, 21) -- Code(Counter(0)) at (prev + 4, 9) to (start + 0, 24) -- Code(Counter(0)) at (prev + 12, 9) to (start + 0, 22) -- Code(Counter(0)) at (prev + 0, 25) to (start + 0, 27) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 30) -- Code(Counter(0)) at (prev + 3, 9) to (start + 0, 41) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 45) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 36) -- Code(Counter(0)) at (prev + 5, 9) to (start + 0, 36) -- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 33) -- Code(Counter(0)) at (prev + 4, 9) to (start + 0, 33) -- Code(Counter(0)) at (prev + 4, 9) to (start + 0, 40) -- Code(Counter(0)) at (prev + 9, 9) to (start + 0, 50) -- Code(Counter(0)) at (prev + 4, 9) to (start + 0, 51) -- Code(Counter(0)) at (prev + 7, 9) to (start + 0, 75) -- Code(Counter(0)) at (prev + 8, 9) to (start + 0, 72) -- Code(Counter(0)) at (prev + 10, 9) to (start + 0, 71) -- Code(Counter(0)) at (prev + 8, 9) to (start + 0, 68) -- Code(Counter(0)) at (prev + 10, 8) to (start + 0, 16) -- Code(Counter(1)) at (prev + 0, 17) to (start + 4, 6) +- Code(Counter(0)) at (prev + 15, 5) to (start + 0, 23) +- Code(Counter(0)) at (prev + 12, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 3, 9) to (start + 5, 10) +- Code(Counter(0)) at (prev + 19, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 3, 9) to (start + 6, 33) +- Code(Counter(0)) at (prev + 22, 25) to (start + 0, 27) +- Code(Counter(0)) at (prev + 77, 8) to (start + 0, 16) - Code(Counter(1)) at (prev + 1, 9) to (start + 0, 48) -- Code(Expression(0, Sub)) at (prev + 3, 5) to (start + 0, 6) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 78) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 75) +- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 6) = (c0 - c1) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 40) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 70) @@ -70,83 +37,86 @@ Number of file 0 mappings: 61 Highest counter ID seen: c1 Function name: closure::main::{closure#0} (unused) -Raw bytes (49): 0x[01, 01, 00, 09, 00, 28, 05, 00, 06, 00, 01, 0d, 00, 1a, 00, 00, 1d, 00, 1e, 00, 01, 0c, 00, 14, 00, 00, 15, 02, 0a, 00, 02, 09, 00, 0a, 00, 01, 09, 00, 17, 00, 00, 18, 00, 20, 00, 01, 05, 00, 06] +Raw bytes (39): 0x[01, 01, 00, 07, 00, 29, 05, 00, 06, 00, 01, 1d, 00, 1e, 00, 01, 0c, 00, 14, 00, 01, 0d, 00, 1b, 00, 01, 09, 00, 0a, 00, 01, 09, 00, 22, 00, 01, 05, 00, 06] Number of files: 1 - file 0 => $DIR/closure.rs Number of expressions: 0 -Number of file 0 mappings: 9 -- Code(Zero) at (prev + 40, 5) to (start + 0, 6) -- Code(Zero) at (prev + 1, 13) to (start + 0, 26) -- Code(Zero) at (prev + 0, 29) to (start + 0, 30) +Number of file 0 mappings: 7 +- Code(Zero) at (prev + 41, 5) to (start + 0, 6) +- Code(Zero) at (prev + 1, 29) to (start + 0, 30) - Code(Zero) at (prev + 1, 12) to (start + 0, 20) -- Code(Zero) at (prev + 0, 21) to (start + 2, 10) -- Code(Zero) at (prev + 2, 9) to (start + 0, 10) -- Code(Zero) at (prev + 1, 9) to (start + 0, 23) -- Code(Zero) at (prev + 0, 24) to (start + 0, 32) +- Code(Zero) at (prev + 1, 13) to (start + 0, 27) +- Code(Zero) at (prev + 1, 9) to (start + 0, 10) +- Code(Zero) at (prev + 1, 9) to (start + 0, 34) - Code(Zero) at (prev + 1, 5) to (start + 0, 6) Highest counter ID seen: (none) Function name: closure::main::{closure#10} (unused) -Raw bytes (20): 0x[01, 01, 00, 03, 00, 9b, 01, 07, 00, 08, 00, 00, 09, 00, 11, 00, 00, 20, 00, 21] +Raw bytes (25): 0x[01, 01, 00, 04, 00, 9c, 01, 07, 00, 08, 00, 00, 09, 00, 11, 00, 00, 12, 00, 1e, 00, 00, 20, 00, 21] Number of files: 1 - file 0 => $DIR/closure.rs Number of expressions: 0 -Number of file 0 mappings: 3 -- Code(Zero) at (prev + 155, 7) to (start + 0, 8) +Number of file 0 mappings: 4 +- Code(Zero) at (prev + 156, 7) to (start + 0, 8) - Code(Zero) at (prev + 0, 9) to (start + 0, 17) +- Code(Zero) at (prev + 0, 18) to (start + 0, 30) - Code(Zero) at (prev + 0, 32) to (start + 0, 33) Highest counter ID seen: (none) Function name: closure::main::{closure#11} (unused) -Raw bytes (20): 0x[01, 01, 00, 03, 00, 9f, 01, 07, 00, 08, 00, 00, 09, 00, 11, 00, 00, 20, 00, 21] +Raw bytes (25): 0x[01, 01, 00, 04, 00, a0, 01, 07, 00, 08, 00, 00, 09, 00, 11, 00, 00, 12, 00, 1e, 00, 00, 20, 00, 21] Number of files: 1 - file 0 => $DIR/closure.rs Number of expressions: 0 -Number of file 0 mappings: 3 -- Code(Zero) at (prev + 159, 7) to (start + 0, 8) +Number of file 0 mappings: 4 +- Code(Zero) at (prev + 160, 7) to (start + 0, 8) - Code(Zero) at (prev + 0, 9) to (start + 0, 17) +- Code(Zero) at (prev + 0, 18) to (start + 0, 30) - Code(Zero) at (prev + 0, 32) to (start + 0, 33) Highest counter ID seen: (none) Function name: closure::main::{closure#12} (unused) -Raw bytes (10): 0x[01, 01, 00, 01, 00, a7, 01, 01, 00, 09] +Raw bytes (15): 0x[01, 01, 00, 02, 00, a8, 01, 01, 00, 09, 00, 00, 0a, 00, 16] Number of files: 1 - file 0 => $DIR/closure.rs Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Zero) at (prev + 167, 1) to (start + 0, 9) +Number of file 0 mappings: 2 +- Code(Zero) at (prev + 168, 1) to (start + 0, 9) +- Code(Zero) at (prev + 0, 10) to (start + 0, 22) Highest counter ID seen: (none) Function name: closure::main::{closure#13} (unused) -Raw bytes (10): 0x[01, 01, 00, 01, 00, ac, 01, 0d, 00, 15] +Raw bytes (15): 0x[01, 01, 00, 02, 00, ad, 01, 0d, 00, 15, 00, 01, 11, 00, 1d] Number of files: 1 - file 0 => $DIR/closure.rs Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Zero) at (prev + 172, 13) to (start + 0, 21) +Number of file 0 mappings: 2 +- Code(Zero) at (prev + 173, 13) to (start + 0, 21) +- Code(Zero) at (prev + 1, 17) to (start + 0, 29) Highest counter ID seen: (none) Function name: closure::main::{closure#14} -Raw bytes (22): 0x[01, 01, 01, 01, 05, 03, 01, b5, 01, 14, 00, 1b, 05, 00, 1e, 00, 25, 02, 00, 2f, 00, 33] +Raw bytes (27): 0x[01, 01, 01, 01, 05, 04, 01, b4, 01, 0d, 00, 15, 01, 02, 14, 00, 1b, 05, 00, 1e, 00, 25, 02, 00, 2f, 00, 33] Number of files: 1 - file 0 => $DIR/closure.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 3 -- Code(Counter(0)) at (prev + 181, 20) to (start + 0, 27) +Number of file 0 mappings: 4 +- Code(Counter(0)) at (prev + 180, 13) to (start + 0, 21) +- Code(Counter(0)) at (prev + 2, 20) to (start + 0, 27) - Code(Counter(1)) at (prev + 0, 30) to (start + 0, 37) - Code(Expression(0, Sub)) at (prev + 0, 47) to (start + 0, 51) = (c0 - c1) Highest counter ID seen: c1 Function name: closure::main::{closure#15} -Raw bytes (37): 0x[01, 01, 01, 01, 05, 06, 01, bb, 01, 09, 00, 0a, 01, 01, 0d, 00, 15, 01, 02, 14, 00, 1b, 05, 00, 1e, 00, 25, 02, 00, 2f, 00, 33, 01, 02, 09, 00, 0a] +Raw bytes (37): 0x[01, 01, 01, 01, 05, 06, 01, bc, 01, 09, 00, 0a, 01, 01, 0d, 00, 15, 01, 02, 14, 00, 1b, 05, 00, 1e, 00, 25, 02, 00, 2f, 00, 33, 01, 02, 09, 00, 0a] Number of files: 1 - file 0 => $DIR/closure.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) Number of file 0 mappings: 6 -- Code(Counter(0)) at (prev + 187, 9) to (start + 0, 10) +- Code(Counter(0)) at (prev + 188, 9) to (start + 0, 10) - Code(Counter(0)) at (prev + 1, 13) to (start + 0, 21) - Code(Counter(0)) at (prev + 2, 20) to (start + 0, 27) - Code(Counter(1)) at (prev + 0, 30) to (start + 0, 37) @@ -156,26 +126,27 @@ Number of file 0 mappings: 6 Highest counter ID seen: c1 Function name: closure::main::{closure#16} -Raw bytes (22): 0x[01, 01, 01, 01, 05, 03, 01, c7, 01, 14, 00, 1b, 05, 00, 1e, 00, 25, 02, 00, 2f, 00, 33] +Raw bytes (27): 0x[01, 01, 01, 01, 05, 04, 01, c6, 01, 0d, 00, 15, 01, 02, 14, 00, 1b, 05, 00, 1e, 00, 25, 02, 00, 2f, 00, 33] Number of files: 1 - file 0 => $DIR/closure.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 3 -- Code(Counter(0)) at (prev + 199, 20) to (start + 0, 27) +Number of file 0 mappings: 4 +- Code(Counter(0)) at (prev + 198, 13) to (start + 0, 21) +- Code(Counter(0)) at (prev + 2, 20) to (start + 0, 27) - Code(Counter(1)) at (prev + 0, 30) to (start + 0, 37) - Code(Expression(0, Sub)) at (prev + 0, 47) to (start + 0, 51) = (c0 - c1) Highest counter ID seen: c1 Function name: closure::main::{closure#17} -Raw bytes (37): 0x[01, 01, 01, 01, 05, 06, 01, cd, 01, 09, 00, 0a, 01, 01, 0d, 00, 15, 01, 02, 14, 00, 1b, 05, 00, 1e, 00, 25, 02, 00, 2f, 00, 33, 01, 02, 09, 00, 0a] +Raw bytes (37): 0x[01, 01, 01, 01, 05, 06, 01, ce, 01, 09, 00, 0a, 01, 01, 0d, 00, 15, 01, 02, 14, 00, 1b, 05, 00, 1e, 00, 25, 02, 00, 2f, 00, 33, 01, 02, 09, 00, 0a] Number of files: 1 - file 0 => $DIR/closure.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) Number of file 0 mappings: 6 -- Code(Counter(0)) at (prev + 205, 9) to (start + 0, 10) +- Code(Counter(0)) at (prev + 206, 9) to (start + 0, 10) - Code(Counter(0)) at (prev + 1, 13) to (start + 0, 21) - Code(Counter(0)) at (prev + 2, 20) to (start + 0, 27) - Code(Counter(1)) at (prev + 0, 30) to (start + 0, 37) @@ -185,139 +156,147 @@ Number of file 0 mappings: 6 Highest counter ID seen: c1 Function name: closure::main::{closure#18} (unused) -Raw bytes (49): 0x[01, 01, 00, 09, 00, 19, 0d, 00, 0e, 00, 01, 15, 00, 22, 00, 00, 25, 00, 26, 00, 01, 14, 00, 1c, 00, 00, 1d, 02, 12, 00, 02, 11, 00, 12, 00, 01, 11, 00, 1f, 00, 00, 20, 00, 28, 00, 01, 0d, 00, 0e] +Raw bytes (39): 0x[01, 01, 00, 07, 00, 1a, 0d, 00, 0e, 00, 01, 25, 00, 26, 00, 01, 14, 00, 1c, 00, 01, 15, 00, 23, 00, 01, 11, 00, 12, 00, 01, 11, 00, 2a, 00, 01, 0d, 00, 0e] Number of files: 1 - file 0 => $DIR/closure.rs Number of expressions: 0 -Number of file 0 mappings: 9 -- Code(Zero) at (prev + 25, 13) to (start + 0, 14) -- Code(Zero) at (prev + 1, 21) to (start + 0, 34) -- Code(Zero) at (prev + 0, 37) to (start + 0, 38) +Number of file 0 mappings: 7 +- Code(Zero) at (prev + 26, 13) to (start + 0, 14) +- Code(Zero) at (prev + 1, 37) to (start + 0, 38) - Code(Zero) at (prev + 1, 20) to (start + 0, 28) -- Code(Zero) at (prev + 0, 29) to (start + 2, 18) -- Code(Zero) at (prev + 2, 17) to (start + 0, 18) -- Code(Zero) at (prev + 1, 17) to (start + 0, 31) -- Code(Zero) at (prev + 0, 32) to (start + 0, 40) +- Code(Zero) at (prev + 1, 21) to (start + 0, 35) +- Code(Zero) at (prev + 1, 17) to (start + 0, 18) +- Code(Zero) at (prev + 1, 17) to (start + 0, 42) - Code(Zero) at (prev + 1, 13) to (start + 0, 14) Highest counter ID seen: (none) Function name: closure::main::{closure#19} -Raw bytes (51): 0x[01, 01, 01, 01, 05, 09, 01, 43, 0d, 00, 0e, 01, 01, 15, 00, 22, 01, 00, 25, 00, 26, 01, 01, 14, 00, 1c, 05, 00, 1d, 02, 12, 02, 02, 11, 00, 12, 01, 01, 11, 00, 1f, 01, 00, 20, 00, 28, 01, 01, 0d, 00, 0e] +Raw bytes (41): 0x[01, 01, 01, 01, 05, 07, 01, 44, 0d, 00, 0e, 01, 01, 25, 00, 26, 01, 01, 14, 00, 1c, 05, 01, 15, 00, 23, 02, 01, 11, 00, 12, 01, 01, 11, 00, 2a, 01, 01, 0d, 00, 0e] Number of files: 1 - file 0 => $DIR/closure.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 9 -- Code(Counter(0)) at (prev + 67, 13) to (start + 0, 14) -- Code(Counter(0)) at (prev + 1, 21) to (start + 0, 34) -- Code(Counter(0)) at (prev + 0, 37) to (start + 0, 38) +Number of file 0 mappings: 7 +- Code(Counter(0)) at (prev + 68, 13) to (start + 0, 14) +- Code(Counter(0)) at (prev + 1, 37) to (start + 0, 38) - Code(Counter(0)) at (prev + 1, 20) to (start + 0, 28) -- Code(Counter(1)) at (prev + 0, 29) to (start + 2, 18) -- Code(Expression(0, Sub)) at (prev + 2, 17) to (start + 0, 18) +- Code(Counter(1)) at (prev + 1, 21) to (start + 0, 35) +- Code(Expression(0, Sub)) at (prev + 1, 17) to (start + 0, 18) = (c0 - c1) -- Code(Counter(0)) at (prev + 1, 17) to (start + 0, 31) -- Code(Counter(0)) at (prev + 0, 32) to (start + 0, 40) +- Code(Counter(0)) at (prev + 1, 17) to (start + 0, 42) - Code(Counter(0)) at (prev + 1, 13) to (start + 0, 14) Highest counter ID seen: c1 Function name: closure::main::{closure#1} -Raw bytes (51): 0x[01, 01, 01, 01, 05, 09, 01, 52, 05, 00, 06, 01, 01, 0d, 00, 1a, 01, 00, 1d, 00, 1e, 01, 01, 0c, 00, 14, 05, 00, 15, 02, 0a, 02, 02, 09, 00, 0a, 01, 01, 09, 00, 17, 01, 00, 18, 00, 20, 01, 01, 05, 00, 06] +Raw bytes (41): 0x[01, 01, 01, 01, 05, 07, 01, 53, 05, 00, 06, 01, 01, 1d, 00, 1e, 01, 01, 0c, 00, 14, 05, 01, 0d, 00, 1b, 02, 01, 09, 00, 0a, 01, 01, 09, 00, 22, 01, 01, 05, 00, 06] Number of files: 1 - file 0 => $DIR/closure.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 9 -- Code(Counter(0)) at (prev + 82, 5) to (start + 0, 6) -- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 26) -- Code(Counter(0)) at (prev + 0, 29) to (start + 0, 30) +Number of file 0 mappings: 7 +- Code(Counter(0)) at (prev + 83, 5) to (start + 0, 6) +- Code(Counter(0)) at (prev + 1, 29) to (start + 0, 30) - Code(Counter(0)) at (prev + 1, 12) to (start + 0, 20) -- Code(Counter(1)) at (prev + 0, 21) to (start + 2, 10) -- Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 10) +- Code(Counter(1)) at (prev + 1, 13) to (start + 0, 27) +- Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 10) = (c0 - c1) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 23) -- Code(Counter(0)) at (prev + 0, 24) to (start + 0, 32) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 34) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 6) Highest counter ID seen: c1 Function name: closure::main::{closure#2} -Raw bytes (46): 0x[01, 01, 01, 01, 05, 08, 01, 68, 05, 00, 06, 01, 01, 0d, 00, 1a, 01, 00, 1d, 00, 1e, 01, 01, 0c, 00, 14, 05, 00, 15, 02, 0a, 02, 02, 09, 00, 0a, 01, 01, 09, 00, 10, 01, 01, 05, 00, 06] +Raw bytes (46): 0x[01, 01, 01, 01, 05, 08, 01, 69, 05, 00, 06, 01, 01, 1d, 00, 1e, 01, 01, 0c, 00, 14, 05, 01, 0d, 00, 1b, 02, 01, 09, 00, 0a, 01, 01, 09, 00, 10, 01, 00, 19, 00, 1c, 01, 01, 05, 00, 06] Number of files: 1 - file 0 => $DIR/closure.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) Number of file 0 mappings: 8 -- Code(Counter(0)) at (prev + 104, 5) to (start + 0, 6) -- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 26) -- Code(Counter(0)) at (prev + 0, 29) to (start + 0, 30) +- Code(Counter(0)) at (prev + 105, 5) to (start + 0, 6) +- Code(Counter(0)) at (prev + 1, 29) to (start + 0, 30) - Code(Counter(0)) at (prev + 1, 12) to (start + 0, 20) -- Code(Counter(1)) at (prev + 0, 21) to (start + 2, 10) -- Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 10) +- Code(Counter(1)) at (prev + 1, 13) to (start + 0, 27) +- Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 10) = (c0 - c1) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 16) +- Code(Counter(0)) at (prev + 0, 25) to (start + 0, 28) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 6) Highest counter ID seen: c1 Function name: closure::main::{closure#3} (unused) -Raw bytes (40): 0x[01, 01, 00, 07, 00, 81, 01, 05, 00, 06, 00, 01, 0c, 00, 14, 00, 00, 15, 02, 0a, 00, 02, 09, 00, 0a, 00, 01, 09, 00, 23, 00, 00, 24, 00, 2c, 00, 01, 05, 00, 06] +Raw bytes (35): 0x[01, 01, 00, 06, 00, 82, 01, 05, 00, 06, 00, 01, 0c, 00, 14, 00, 01, 0d, 00, 1b, 00, 01, 09, 00, 0a, 00, 01, 09, 00, 2e, 00, 01, 05, 00, 06] Number of files: 1 - file 0 => $DIR/closure.rs Number of expressions: 0 -Number of file 0 mappings: 7 -- Code(Zero) at (prev + 129, 5) to (start + 0, 6) +Number of file 0 mappings: 6 +- Code(Zero) at (prev + 130, 5) to (start + 0, 6) - Code(Zero) at (prev + 1, 12) to (start + 0, 20) -- Code(Zero) at (prev + 0, 21) to (start + 2, 10) -- Code(Zero) at (prev + 2, 9) to (start + 0, 10) -- Code(Zero) at (prev + 1, 9) to (start + 0, 35) -- Code(Zero) at (prev + 0, 36) to (start + 0, 44) +- Code(Zero) at (prev + 1, 13) to (start + 0, 27) +- Code(Zero) at (prev + 1, 9) to (start + 0, 10) +- Code(Zero) at (prev + 1, 9) to (start + 0, 46) - Code(Zero) at (prev + 1, 5) to (start + 0, 6) Highest counter ID seen: (none) +Function name: closure::main::{closure#4} (unused) +Raw bytes (15): 0x[01, 01, 00, 02, 00, 8a, 01, 35, 00, 3e, 00, 00, 42, 00, 43] +Number of files: 1 +- file 0 => $DIR/closure.rs +Number of expressions: 0 +Number of file 0 mappings: 2 +- Code(Zero) at (prev + 138, 53) to (start + 0, 62) +- Code(Zero) at (prev + 0, 66) to (start + 0, 67) +Highest counter ID seen: (none) + Function name: closure::main::{closure#5} -Raw bytes (10): 0x[01, 01, 00, 01, 01, 8c, 01, 3d, 00, 45] +Raw bytes (15): 0x[01, 01, 00, 02, 01, 8d, 01, 3d, 00, 45, 01, 00, 46, 00, 4e] Number of files: 1 - file 0 => $DIR/closure.rs Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 140, 61) to (start + 0, 69) +Number of file 0 mappings: 2 +- Code(Counter(0)) at (prev + 141, 61) to (start + 0, 69) +- Code(Counter(0)) at (prev + 0, 70) to (start + 0, 78) Highest counter ID seen: c0 Function name: closure::main::{closure#6} -Raw bytes (10): 0x[01, 01, 00, 01, 01, 8d, 01, 41, 00, 49] +Raw bytes (15): 0x[01, 01, 00, 02, 01, 8e, 01, 41, 00, 49, 01, 00, 4a, 00, 56] Number of files: 1 - file 0 => $DIR/closure.rs Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 141, 65) to (start + 0, 73) +Number of file 0 mappings: 2 +- Code(Counter(0)) at (prev + 142, 65) to (start + 0, 73) +- Code(Counter(0)) at (prev + 0, 74) to (start + 0, 86) Highest counter ID seen: c0 Function name: closure::main::{closure#7} (unused) -Raw bytes (10): 0x[01, 01, 00, 01, 00, 8e, 01, 3b, 00, 43] +Raw bytes (15): 0x[01, 01, 00, 02, 00, 8f, 01, 3b, 00, 43, 00, 00, 44, 00, 50] Number of files: 1 - file 0 => $DIR/closure.rs Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Zero) at (prev + 142, 59) to (start + 0, 67) +Number of file 0 mappings: 2 +- Code(Zero) at (prev + 143, 59) to (start + 0, 67) +- Code(Zero) at (prev + 0, 68) to (start + 0, 80) Highest counter ID seen: (none) Function name: closure::main::{closure#8} (unused) -Raw bytes (20): 0x[01, 01, 00, 03, 00, 93, 01, 3b, 00, 3c, 00, 00, 3d, 00, 45, 00, 00, 54, 00, 55] +Raw bytes (25): 0x[01, 01, 00, 04, 00, 94, 01, 3b, 00, 3c, 00, 00, 3d, 00, 45, 00, 00, 46, 00, 52, 00, 00, 54, 00, 55] Number of files: 1 - file 0 => $DIR/closure.rs Number of expressions: 0 -Number of file 0 mappings: 3 -- Code(Zero) at (prev + 147, 59) to (start + 0, 60) +Number of file 0 mappings: 4 +- Code(Zero) at (prev + 148, 59) to (start + 0, 60) - Code(Zero) at (prev + 0, 61) to (start + 0, 69) +- Code(Zero) at (prev + 0, 70) to (start + 0, 82) - Code(Zero) at (prev + 0, 84) to (start + 0, 85) Highest counter ID seen: (none) Function name: closure::main::{closure#9} (unused) -Raw bytes (20): 0x[01, 01, 00, 03, 00, 95, 01, 38, 00, 39, 00, 01, 09, 00, 11, 00, 01, 05, 00, 06] +Raw bytes (25): 0x[01, 01, 00, 04, 00, 96, 01, 38, 00, 39, 00, 01, 09, 00, 11, 00, 00, 12, 00, 1e, 00, 01, 05, 00, 06] Number of files: 1 - file 0 => $DIR/closure.rs Number of expressions: 0 -Number of file 0 mappings: 3 -- Code(Zero) at (prev + 149, 56) to (start + 0, 57) +Number of file 0 mappings: 4 +- Code(Zero) at (prev + 150, 56) to (start + 0, 57) - Code(Zero) at (prev + 1, 9) to (start + 0, 17) +- Code(Zero) at (prev + 0, 18) to (start + 0, 30) - Code(Zero) at (prev + 1, 5) to (start + 0, 6) Highest counter ID seen: (none) diff --git a/tests/coverage/iffy/closure.coverage b/tests/coverage/iffy/closure.coverage index 64e6006bbe8cd..a56aab6b5f97f 100644 --- a/tests/coverage/iffy/closure.coverage +++ b/tests/coverage/iffy/closure.coverage @@ -1,5 +1,6 @@ LL| |#![allow(unused_assignments, unused_variables)] LL| |//@ compile-flags: -C opt-level=2 + LL| |//@ min-llvm-version: 23 LL| | LL| |// This test used to be sensitive to certain coverage-specific hacks in LL| |// `rustc_middle/mir/mono.rs`, but those hacks were later cleaned up by @@ -19,7 +20,7 @@ LL| | , LL| 1| some_string LL| | . - LL| 1| unwrap_or_else + LL| | unwrap_or_else LL| | ( LL| | || LL| 0| { @@ -34,7 +35,7 @@ LL| | LL| 1| some_string = Some(String::from("the string content")); LL| | let - LL| 1| a + LL| | a LL| | = LL| | || LL| 0| { @@ -48,11 +49,11 @@ LL| | "The string or alt: {}" LL| | , LL| 1| some_string - LL| | . + LL| 1| . LL| 1| unwrap_or_else - LL| | ( + LL| 1| ( LL| 1| a - LL| | ) + LL| 1| ) LL| | ); LL| | LL| 1| some_string = None; @@ -61,7 +62,7 @@ LL| | , LL| 1| some_string LL| | . - LL| 1| unwrap_or_else + LL| | unwrap_or_else LL| | ( LL| | || LL| 1| { @@ -76,7 +77,7 @@ LL| | LL| 1| some_string = None; LL| | let - LL| 1| a + LL| | a LL| | = LL| | || LL| 1| { @@ -90,15 +91,15 @@ LL| | "The string or alt: {}" LL| | , LL| 1| some_string - LL| | . + LL| 1| . LL| 1| unwrap_or_else - LL| | ( + LL| 1| ( LL| 1| a - LL| | ) + LL| 1| ) LL| | ); LL| | LL| | let - LL| 1| quote_closure + LL| | quote_closure LL| | = LL| | |val| LL| 5| { @@ -114,14 +115,14 @@ LL| 1| std::iter::repeat("repeat me") LL| 1| .take(5) LL| 1| .map - LL| | ( + LL| 1| ( LL| 1| quote_closure - LL| | ) + LL| 1| ) LL| 1| .collect::>() LL| | ); LL| | LL| | let - LL| 1| _unused_closure + LL| | _unused_closure LL| | = LL| | | LL| | mut countdown @@ -134,31 +135,27 @@ LL| 0| }; LL| | LL| 1| let mut countdown = 10; - LL| 1| let _short_unused_closure = | _unused_arg: u8 | countdown += 1; + LL| 0| let _short_unused_closure = | _unused_arg: u8 | countdown += 1; LL| | LL| | LL| 1| let short_used_covered_closure_macro = | used_arg: u8 | println!("called"); - LL| 1| let short_used_not_covered_closure_macro = | used_arg: u8 | println!("not called"); - ^0 - LL| 1| let _short_unused_closure_macro = | _unused_arg: u8 | println!("not called"); - ^0 + LL| 0| let short_used_not_covered_closure_macro = | used_arg: u8 | println!("not called"); + LL| 0| let _short_unused_closure_macro = | _unused_arg: u8 | println!("not called"); LL| | LL| | LL| | LL| | - LL| 1| let _short_unused_closure_block = | _unused_arg: u8 | { println!("not called") }; - ^0^0 ^0 + LL| 0| let _short_unused_closure_block = | _unused_arg: u8 | { println!("not called") }; LL| | - LL| 1| let _shortish_unused_closure = | _unused_arg: u8 | { - ^0 + LL| 0| let _shortish_unused_closure = | _unused_arg: u8 | { LL| 0| println!("not called") LL| 0| }; LL| | - LL| 1| let _as_short_unused_closure = | + LL| | let _as_short_unused_closure = | LL| | _unused_arg: u8 LL| 0| | { println!("not called") }; LL| | - LL| 1| let _almost_as_short_unused_closure = | + LL| | let _almost_as_short_unused_closure = | LL| | _unused_arg: u8 LL| 0| | { println!("not called") } LL| | ; @@ -167,26 +164,26 @@ LL| | LL| | LL| | - LL| 1| let _short_unused_closure_line_break_no_block = | _unused_arg: u8 | + LL| | let _short_unused_closure_line_break_no_block = | _unused_arg: u8 | LL| 0|println!("not called") LL| | ; LL| | - LL| 1| let _short_unused_closure_line_break_no_block2 = + LL| | let _short_unused_closure_line_break_no_block2 = LL| | | _unused_arg: u8 | LL| 0| println!( - LL| | "not called" + LL| 0| "not called" LL| | ) LL| | ; LL| | - LL| 1| let short_used_not_covered_closure_line_break_no_block_embedded_branch = + LL| | let short_used_not_covered_closure_line_break_no_block_embedded_branch = LL| | | _unused_arg: u8 | - LL| | println!( + LL| 0| println!( LL| | "not called: {}", LL| 0| if is_true { "check" } else { "me" } LL| | ) LL| | ; LL| | - LL| 1| let short_used_not_covered_closure_line_break_block_embedded_branch = + LL| | let short_used_not_covered_closure_line_break_block_embedded_branch = LL| | | _unused_arg: u8 | LL| 0| { LL| 0| println!( @@ -196,16 +193,16 @@ LL| 0| } LL| | ; LL| | - LL| 1| let short_used_covered_closure_line_break_no_block_embedded_branch = + LL| | let short_used_covered_closure_line_break_no_block_embedded_branch = LL| | | _unused_arg: u8 | - LL| | println!( + LL| 1| println!( LL| | "not called: {}", LL| 1| if is_true { "check" } else { "me" } ^0 LL| | ) LL| | ; LL| | - LL| 1| let short_used_covered_closure_line_break_block_embedded_branch = + LL| | let short_used_covered_closure_line_break_block_embedded_branch = LL| | | _unused_arg: u8 | LL| 1| { LL| 1| println!( diff --git a/tests/coverage/iffy/closure.rs b/tests/coverage/iffy/closure.rs index 1e433b61a6c38..4ada30efb75fe 100644 --- a/tests/coverage/iffy/closure.rs +++ b/tests/coverage/iffy/closure.rs @@ -1,5 +1,6 @@ #![allow(unused_assignments, unused_variables)] //@ compile-flags: -C opt-level=2 +//@ min-llvm-version: 23 // This test used to be sensitive to certain coverage-specific hacks in // `rustc_middle/mir/mono.rs`, but those hacks were later cleaned up by diff --git a/tests/coverage/iffy/closure_macro.cov-map b/tests/coverage/iffy/closure_macro.cov-map index dd3629771085f..0ba729ca05f7e 100644 --- a/tests/coverage/iffy/closure_macro.cov-map +++ b/tests/coverage/iffy/closure_macro.cov-map @@ -10,22 +10,19 @@ Number of file 0 mappings: 3 Highest counter ID seen: c0 Function name: closure_macro::main -Raw bytes (61): 0x[01, 01, 01, 01, 05, 0b, 01, 21, 01, 00, 24, 01, 01, 05, 00, 0d, 02, 01, 09, 00, 0f, 01, 00, 12, 00, 1b, 01, 00, 1c, 00, 34, 05, 00, 54, 00, 55, 02, 02, 09, 00, 1f, 02, 00, 22, 00, 2e, 02, 01, 0d, 00, 2d, 02, 01, 05, 00, 0b, 01, 01, 01, 00, 02] +Raw bytes (56): 0x[01, 01, 01, 01, 05, 0a, 01, 21, 01, 00, 24, 01, 01, 05, 00, 0d, 01, 00, 0e, 00, 20, 01, 01, 12, 00, 1b, 01, 00, 1c, 00, 36, 05, 00, 54, 00, 55, 02, 02, 22, 00, 35, 02, 01, 0d, 00, 2d, 02, 01, 05, 00, 0b, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/closure_macro.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 11 +Number of file 0 mappings: 10 - Code(Counter(0)) at (prev + 33, 1) to (start + 0, 36) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) -- Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 15) - = (c0 - c1) -- Code(Counter(0)) at (prev + 0, 18) to (start + 0, 27) -- Code(Counter(0)) at (prev + 0, 28) to (start + 0, 52) +- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 32) +- Code(Counter(0)) at (prev + 1, 18) to (start + 0, 27) +- Code(Counter(0)) at (prev + 0, 28) to (start + 0, 54) - Code(Counter(1)) at (prev + 0, 84) to (start + 0, 85) -- Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 31) - = (c0 - c1) -- Code(Expression(0, Sub)) at (prev + 0, 34) to (start + 0, 46) +- Code(Expression(0, Sub)) at (prev + 2, 34) to (start + 0, 53) = (c0 - c1) - Code(Expression(0, Sub)) at (prev + 1, 13) to (start + 0, 45) = (c0 - c1) @@ -35,17 +32,18 @@ Number of file 0 mappings: 11 Highest counter ID seen: c1 Function name: closure_macro::main::{closure#0} -Raw bytes (51): 0x[01, 01, 01, 01, 05, 09, 01, 10, 1c, 00, 1d, 01, 02, 11, 00, 18, 01, 00, 1b, 00, 22, 01, 01, 10, 00, 21, 05, 01, 11, 00, 19, 05, 01, 11, 00, 27, 02, 02, 11, 00, 16, 02, 00, 17, 00, 1e, 01, 02, 09, 00, 0a] +Raw bytes (56): 0x[01, 01, 01, 01, 05, 0a, 01, 10, 1c, 00, 1d, 01, 02, 1b, 00, 22, 01, 00, 33, 00, 34, 01, 01, 10, 00, 21, 05, 01, 11, 00, 19, 05, 00, 20, 00, 27, 05, 01, 11, 00, 27, 02, 02, 11, 00, 16, 02, 00, 17, 00, 1e, 01, 02, 09, 00, 0a] Number of files: 1 - file 0 => $DIR/closure_macro.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 9 +Number of file 0 mappings: 10 - Code(Counter(0)) at (prev + 16, 28) to (start + 0, 29) -- Code(Counter(0)) at (prev + 2, 17) to (start + 0, 24) -- Code(Counter(0)) at (prev + 0, 27) to (start + 0, 34) +- Code(Counter(0)) at (prev + 2, 27) to (start + 0, 34) +- Code(Counter(0)) at (prev + 0, 51) to (start + 0, 52) - Code(Counter(0)) at (prev + 1, 16) to (start + 0, 33) - Code(Counter(1)) at (prev + 1, 17) to (start + 0, 25) +- Code(Counter(1)) at (prev + 0, 32) to (start + 0, 39) - Code(Counter(1)) at (prev + 1, 17) to (start + 0, 39) - Code(Expression(0, Sub)) at (prev + 2, 17) to (start + 0, 22) = (c0 - c1) diff --git a/tests/coverage/iffy/conditions.cov-map b/tests/coverage/iffy/conditions.cov-map index 1872f14aede0b..d11b003d8ba51 100644 --- a/tests/coverage/iffy/conditions.cov-map +++ b/tests/coverage/iffy/conditions.cov-map @@ -1,198 +1,187 @@ Function name: conditions::main -Raw bytes (581): 0x[01, 01, 40, 05, 09, 01, 05, 09, 51, 09, 13, 51, 55, 01, 03, 03, 0d, 11, 49, 11, 27, 49, 4d, 03, 63, 0d, 11, 0d, 11, 0d, 11, 0d, 11, 0d, 11, 0d, 11, 0d, 11, 63, 15, 0d, 11, 19, 41, 19, 5b, 41, 45, 63, bf, 01, 0d, 11, 15, 19, 15, 19, 15, 19, 15, 19, 15, 19, 1d, 21, 15, 19, bf, 01, 1d, 15, 19, 21, 39, 21, 93, 01, 39, 3d, bf, 01, fb, 01, 15, 19, 1d, 21, bf, 01, fb, 01, 15, 19, 1d, 21, bf, 01, fb, 01, 15, 19, 1d, 21, bf, 01, fb, 01, 15, 19, 1d, 21, 25, 29, 1d, 21, fb, 01, 25, 1d, 21, 29, 2d, 29, f3, 01, 2d, 31, f3, 01, 35, 2d, 31, 29, ef, 01, f3, 01, 35, 2d, 31, fb, 01, ff, 01, 1d, 21, 25, 29, 52, 01, 03, 01, 00, 0a, 01, 01, 09, 00, 16, 01, 00, 19, 00, 1a, 01, 01, 08, 00, 0c, 01, 00, 0d, 02, 06, 00, 02, 05, 00, 06, 03, 03, 09, 00, 0a, 01, 00, 10, 00, 1d, 05, 01, 09, 00, 17, 05, 01, 09, 00, 0a, 06, 01, 0f, 00, 1c, 09, 01, 0c, 00, 19, 0a, 00, 1d, 00, 2a, 0e, 00, 2e, 00, 3c, 09, 00, 3d, 02, 0a, 00, 02, 09, 00, 0a, 09, 01, 09, 00, 17, 09, 01, 09, 00, 12, 16, 02, 09, 00, 0f, 03, 03, 09, 00, 16, 03, 00, 19, 00, 1a, 03, 01, 08, 00, 0c, 03, 00, 0d, 02, 06, 00, 02, 05, 00, 06, 03, 02, 08, 00, 15, 0d, 00, 16, 02, 06, 1a, 02, 0f, 00, 1c, 11, 01, 0c, 00, 19, 1e, 00, 1d, 00, 2a, 22, 00, 2e, 00, 3c, 11, 00, 3d, 02, 0a, 00, 02, 09, 00, 0a, 11, 01, 09, 00, 17, 2a, 02, 09, 00, 0f, 63, 03, 08, 00, 0c, 63, 01, 0d, 00, 1a, 63, 00, 1d, 00, 1e, 63, 01, 0c, 00, 10, 63, 00, 11, 02, 0a, 00, 02, 09, 00, 0a, 63, 02, 0c, 00, 19, 15, 00, 1a, 02, 0a, 4a, 04, 11, 00, 1e, 19, 01, 10, 00, 1d, 52, 00, 21, 00, 2e, 56, 00, 32, 00, 40, 19, 00, 41, 02, 0e, 00, 02, 0d, 00, 0e, 19, 01, 0d, 00, 1b, 5e, 02, 0d, 00, 13, 00, 02, 05, 00, 06, bf, 01, 02, 09, 00, 16, bf, 01, 00, 19, 00, 1a, bf, 01, 01, 08, 00, 0c, bf, 01, 00, 0d, 02, 06, 00, 02, 05, 00, 06, fb, 01, 02, 09, 00, 0a, bf, 01, 00, 10, 00, 1d, 1d, 00, 1e, 02, 06, 82, 01, 02, 0f, 00, 1c, 21, 01, 0c, 00, 19, 8a, 01, 00, 1d, 00, 2a, 8e, 01, 00, 2e, 00, 3c, 21, 00, 3d, 02, 0a, 00, 02, 09, 00, 0a, 21, 01, 09, 00, 17, ba, 01, 02, 0d, 00, 20, ba, 01, 00, 23, 00, 2c, ba, 01, 01, 09, 00, 11, ba, 01, 01, 09, 00, 0f, ff, 01, 03, 09, 00, 0a, fb, 01, 00, 10, 00, 1d, 25, 00, 1e, 02, 06, ce, 01, 02, 0f, 00, 1c, 29, 01, 0c, 00, 19, d6, 01, 00, 1d, 00, 2a, da, 01, 00, 2e, 00, 3c, ef, 01, 00, 3d, 02, 0a, ea, 01, 02, 09, 00, 0a, 29, 01, 09, 00, 17, f6, 01, 02, 09, 00, 0f, 01, 02, 01, 00, 02] +Raw bytes (547): 0x[01, 01, 42, 01, 05, 09, 51, 09, 0f, 51, 55, 01, 43, 05, 09, 05, 09, 05, 09, 05, 09, 05, 09, 43, 0d, 05, 09, 11, 49, 11, 3b, 49, 4d, 43, 77, 05, 09, 0d, 11, 0d, 11, 0d, 11, 0d, 11, 0d, 11, 0d, 11, 77, 15, 0d, 11, 19, 41, 19, 6f, 41, 45, 77, cb, 01, 0d, 11, 15, 19, 15, 19, 15, 19, 15, 19, 15, 19, cb, 01, 1d, 15, 19, 21, 39, 21, 9f, 01, 39, 3d, cb, 01, 83, 02, 15, 19, 1d, 21, cb, 01, 83, 02, 15, 19, 1d, 21, cb, 01, 83, 02, 15, 19, 1d, 21, cb, 01, 83, 02, 15, 19, 1d, 21, 1d, 21, 83, 02, 25, 1d, 21, 29, 2d, 29, fb, 01, 2d, 31, fb, 01, 35, 2d, 31, 29, f7, 01, fb, 01, 35, 2d, 31, 83, 02, 87, 02, 1d, 21, 25, 29, 4b, 01, 03, 01, 00, 0a, 01, 01, 19, 00, 1a, 01, 01, 08, 00, 0c, 01, 01, 09, 00, 17, 00, 01, 05, 00, 06, 01, 03, 10, 00, 1d, 05, 01, 09, 00, 17, 05, 01, 09, 00, 0a, 02, 01, 0f, 00, 1c, 09, 01, 0c, 00, 19, 06, 00, 1d, 00, 2a, 0a, 00, 2e, 00, 3c, 09, 01, 0d, 00, 1a, 00, 01, 09, 00, 0a, 09, 01, 09, 00, 17, 09, 01, 09, 00, 12, 12, 02, 09, 00, 0f, 43, 03, 19, 00, 1a, 43, 01, 08, 00, 0c, 43, 01, 09, 00, 17, 00, 01, 05, 00, 06, 43, 02, 08, 00, 15, 0d, 01, 09, 00, 17, 2a, 01, 0f, 00, 1c, 11, 01, 0c, 00, 19, 32, 00, 1d, 00, 2a, 36, 00, 2e, 00, 3c, 11, 01, 0d, 00, 1a, 00, 01, 09, 00, 0a, 11, 01, 09, 00, 17, 3e, 02, 09, 00, 0f, 77, 03, 08, 00, 0c, 77, 01, 1d, 00, 1e, 77, 01, 0c, 00, 10, 77, 01, 0d, 00, 1b, 00, 01, 09, 00, 0a, 77, 02, 0c, 00, 19, 15, 01, 0d, 00, 1b, 5e, 03, 11, 00, 1e, 19, 01, 10, 00, 1d, 66, 00, 21, 00, 2e, 6a, 00, 32, 00, 40, 19, 01, 11, 00, 1e, 00, 01, 0d, 00, 0e, 19, 01, 0d, 00, 1b, 72, 02, 0d, 00, 13, 00, 02, 05, 00, 06, cb, 01, 02, 19, 00, 1a, cb, 01, 01, 08, 00, 0c, cb, 01, 01, 09, 00, 16, 00, 01, 05, 00, 06, cb, 01, 02, 10, 00, 1d, 1d, 01, 09, 00, 17, 8e, 01, 01, 0f, 00, 1c, 21, 01, 0c, 00, 19, 96, 01, 00, 1d, 00, 2a, 9a, 01, 00, 2e, 00, 3c, 21, 01, 0d, 00, 1a, 00, 01, 09, 00, 0a, 21, 01, 09, 00, 17, c6, 01, 02, 23, 00, 2c, c6, 01, 01, 09, 00, 11, c6, 01, 00, 12, 00, 1b, c6, 01, 01, 09, 00, 0f, 83, 02, 03, 10, 00, 1d, 25, 01, 09, 00, 17, d6, 01, 01, 0f, 00, 1c, 29, 01, 0c, 00, 19, de, 01, 00, 1d, 00, 2a, e2, 01, 00, 2e, 00, 3c, f7, 01, 01, 0d, 00, 1a, f2, 01, 01, 09, 00, 0a, 29, 01, 09, 00, 17, fe, 01, 02, 09, 00, 0f, 01, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/conditions.rs -Number of expressions: 64 -- expression 0 operands: lhs = Counter(1), rhs = Counter(2) -- expression 1 operands: lhs = Counter(0), rhs = Counter(1) -- expression 2 operands: lhs = Counter(2), rhs = Counter(20) -- expression 3 operands: lhs = Counter(2), rhs = Expression(4, Add) -- expression 4 operands: lhs = Counter(20), rhs = Counter(21) -- expression 5 operands: lhs = Counter(0), rhs = Expression(0, Add) -- expression 6 operands: lhs = Expression(0, Add), rhs = Counter(3) -- expression 7 operands: lhs = Counter(4), rhs = Counter(18) -- expression 8 operands: lhs = Counter(4), rhs = Expression(9, Add) -- expression 9 operands: lhs = Counter(18), rhs = Counter(19) -- expression 10 operands: lhs = Expression(0, Add), rhs = Expression(24, Add) -- expression 11 operands: lhs = Counter(3), rhs = Counter(4) -- expression 12 operands: lhs = Counter(3), rhs = Counter(4) -- expression 13 operands: lhs = Counter(3), rhs = Counter(4) -- expression 14 operands: lhs = Counter(3), rhs = Counter(4) -- expression 15 operands: lhs = Counter(3), rhs = Counter(4) -- expression 16 operands: lhs = Counter(3), rhs = Counter(4) +Number of expressions: 66 +- expression 0 operands: lhs = Counter(0), rhs = Counter(1) +- expression 1 operands: lhs = Counter(2), rhs = Counter(20) +- expression 2 operands: lhs = Counter(2), rhs = Expression(3, Add) +- expression 3 operands: lhs = Counter(20), rhs = Counter(21) +- expression 4 operands: lhs = Counter(0), rhs = Expression(16, Add) +- expression 5 operands: lhs = Counter(1), rhs = Counter(2) +- expression 6 operands: lhs = Counter(1), rhs = Counter(2) +- expression 7 operands: lhs = Counter(1), rhs = Counter(2) +- expression 8 operands: lhs = Counter(1), rhs = Counter(2) +- expression 9 operands: lhs = Counter(1), rhs = Counter(2) +- expression 10 operands: lhs = Expression(16, Add), rhs = Counter(3) +- expression 11 operands: lhs = Counter(1), rhs = Counter(2) +- expression 12 operands: lhs = Counter(4), rhs = Counter(18) +- expression 13 operands: lhs = Counter(4), rhs = Expression(14, Add) +- expression 14 operands: lhs = Counter(18), rhs = Counter(19) +- expression 15 operands: lhs = Expression(16, Add), rhs = Expression(29, Add) +- expression 16 operands: lhs = Counter(1), rhs = Counter(2) - expression 17 operands: lhs = Counter(3), rhs = Counter(4) -- expression 18 operands: lhs = Expression(24, Add), rhs = Counter(5) +- expression 18 operands: lhs = Counter(3), rhs = Counter(4) - expression 19 operands: lhs = Counter(3), rhs = Counter(4) -- expression 20 operands: lhs = Counter(6), rhs = Counter(16) -- expression 21 operands: lhs = Counter(6), rhs = Expression(22, Add) -- expression 22 operands: lhs = Counter(16), rhs = Counter(17) -- expression 23 operands: lhs = Expression(24, Add), rhs = Expression(47, Add) +- expression 20 operands: lhs = Counter(3), rhs = Counter(4) +- expression 21 operands: lhs = Counter(3), rhs = Counter(4) +- expression 22 operands: lhs = Counter(3), rhs = Counter(4) +- expression 23 operands: lhs = Expression(29, Add), rhs = Counter(5) - expression 24 operands: lhs = Counter(3), rhs = Counter(4) -- expression 25 operands: lhs = Counter(5), rhs = Counter(6) -- expression 26 operands: lhs = Counter(5), rhs = Counter(6) -- expression 27 operands: lhs = Counter(5), rhs = Counter(6) -- expression 28 operands: lhs = Counter(5), rhs = Counter(6) -- expression 29 operands: lhs = Counter(5), rhs = Counter(6) -- expression 30 operands: lhs = Counter(7), rhs = Counter(8) +- expression 25 operands: lhs = Counter(6), rhs = Counter(16) +- expression 26 operands: lhs = Counter(6), rhs = Expression(27, Add) +- expression 27 operands: lhs = Counter(16), rhs = Counter(17) +- expression 28 operands: lhs = Expression(29, Add), rhs = Expression(50, Add) +- expression 29 operands: lhs = Counter(3), rhs = Counter(4) +- expression 30 operands: lhs = Counter(5), rhs = Counter(6) - expression 31 operands: lhs = Counter(5), rhs = Counter(6) -- expression 32 operands: lhs = Expression(47, Add), rhs = Counter(7) +- expression 32 operands: lhs = Counter(5), rhs = Counter(6) - expression 33 operands: lhs = Counter(5), rhs = Counter(6) -- expression 34 operands: lhs = Counter(8), rhs = Counter(14) -- expression 35 operands: lhs = Counter(8), rhs = Expression(36, Add) -- expression 36 operands: lhs = Counter(14), rhs = Counter(15) -- expression 37 operands: lhs = Expression(47, Add), rhs = Expression(62, Add) -- expression 38 operands: lhs = Counter(5), rhs = Counter(6) -- expression 39 operands: lhs = Counter(7), rhs = Counter(8) -- expression 40 operands: lhs = Expression(47, Add), rhs = Expression(62, Add) +- expression 34 operands: lhs = Counter(5), rhs = Counter(6) +- expression 35 operands: lhs = Expression(50, Add), rhs = Counter(7) +- expression 36 operands: lhs = Counter(5), rhs = Counter(6) +- expression 37 operands: lhs = Counter(8), rhs = Counter(14) +- expression 38 operands: lhs = Counter(8), rhs = Expression(39, Add) +- expression 39 operands: lhs = Counter(14), rhs = Counter(15) +- expression 40 operands: lhs = Expression(50, Add), rhs = Expression(64, Add) - expression 41 operands: lhs = Counter(5), rhs = Counter(6) - expression 42 operands: lhs = Counter(7), rhs = Counter(8) -- expression 43 operands: lhs = Expression(47, Add), rhs = Expression(62, Add) +- expression 43 operands: lhs = Expression(50, Add), rhs = Expression(64, Add) - expression 44 operands: lhs = Counter(5), rhs = Counter(6) - expression 45 operands: lhs = Counter(7), rhs = Counter(8) -- expression 46 operands: lhs = Expression(47, Add), rhs = Expression(62, Add) +- expression 46 operands: lhs = Expression(50, Add), rhs = Expression(64, Add) - expression 47 operands: lhs = Counter(5), rhs = Counter(6) - expression 48 operands: lhs = Counter(7), rhs = Counter(8) -- expression 49 operands: lhs = Counter(9), rhs = Counter(10) -- expression 50 operands: lhs = Counter(7), rhs = Counter(8) -- expression 51 operands: lhs = Expression(62, Add), rhs = Counter(9) +- expression 49 operands: lhs = Expression(50, Add), rhs = Expression(64, Add) +- expression 50 operands: lhs = Counter(5), rhs = Counter(6) +- expression 51 operands: lhs = Counter(7), rhs = Counter(8) - expression 52 operands: lhs = Counter(7), rhs = Counter(8) -- expression 53 operands: lhs = Counter(10), rhs = Counter(11) -- expression 54 operands: lhs = Counter(10), rhs = Expression(60, Add) -- expression 55 operands: lhs = Counter(11), rhs = Counter(12) -- expression 56 operands: lhs = Expression(60, Add), rhs = Counter(13) +- expression 53 operands: lhs = Expression(64, Add), rhs = Counter(9) +- expression 54 operands: lhs = Counter(7), rhs = Counter(8) +- expression 55 operands: lhs = Counter(10), rhs = Counter(11) +- expression 56 operands: lhs = Counter(10), rhs = Expression(62, Add) - expression 57 operands: lhs = Counter(11), rhs = Counter(12) -- expression 58 operands: lhs = Counter(10), rhs = Expression(59, Add) -- expression 59 operands: lhs = Expression(60, Add), rhs = Counter(13) -- expression 60 operands: lhs = Counter(11), rhs = Counter(12) -- expression 61 operands: lhs = Expression(62, Add), rhs = Expression(63, Add) -- expression 62 operands: lhs = Counter(7), rhs = Counter(8) -- expression 63 operands: lhs = Counter(9), rhs = Counter(10) -Number of file 0 mappings: 82 +- expression 58 operands: lhs = Expression(62, Add), rhs = Counter(13) +- expression 59 operands: lhs = Counter(11), rhs = Counter(12) +- expression 60 operands: lhs = Counter(10), rhs = Expression(61, Add) +- expression 61 operands: lhs = Expression(62, Add), rhs = Counter(13) +- expression 62 operands: lhs = Counter(11), rhs = Counter(12) +- expression 63 operands: lhs = Expression(64, Add), rhs = Expression(65, Add) +- expression 64 operands: lhs = Counter(7), rhs = Counter(8) +- expression 65 operands: lhs = Counter(9), rhs = Counter(10) +Number of file 0 mappings: 75 - Code(Counter(0)) at (prev + 3, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 22) -- Code(Counter(0)) at (prev + 0, 25) to (start + 0, 26) +- Code(Counter(0)) at (prev + 1, 25) to (start + 0, 26) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 12) -- Code(Counter(0)) at (prev + 0, 13) to (start + 2, 6) -- Code(Zero) at (prev + 2, 5) to (start + 0, 6) -- Code(Expression(0, Add)) at (prev + 3, 9) to (start + 0, 10) - = (c1 + c2) -- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 29) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 23) +- Code(Zero) at (prev + 1, 5) to (start + 0, 6) +- Code(Counter(0)) at (prev + 3, 16) to (start + 0, 29) - Code(Counter(1)) at (prev + 1, 9) to (start + 0, 23) - Code(Counter(1)) at (prev + 1, 9) to (start + 0, 10) -- Code(Expression(1, Sub)) at (prev + 1, 15) to (start + 0, 28) +- Code(Expression(0, Sub)) at (prev + 1, 15) to (start + 0, 28) = (c0 - c1) - Code(Counter(2)) at (prev + 1, 12) to (start + 0, 25) -- Code(Expression(2, Sub)) at (prev + 0, 29) to (start + 0, 42) +- Code(Expression(1, Sub)) at (prev + 0, 29) to (start + 0, 42) = (c2 - c20) -- Code(Expression(3, Sub)) at (prev + 0, 46) to (start + 0, 60) +- Code(Expression(2, Sub)) at (prev + 0, 46) to (start + 0, 60) = (c2 - (c20 + c21)) -- Code(Counter(2)) at (prev + 0, 61) to (start + 2, 10) -- Code(Zero) at (prev + 2, 9) to (start + 0, 10) +- Code(Counter(2)) at (prev + 1, 13) to (start + 0, 26) +- Code(Zero) at (prev + 1, 9) to (start + 0, 10) - Code(Counter(2)) at (prev + 1, 9) to (start + 0, 23) - Code(Counter(2)) at (prev + 1, 9) to (start + 0, 18) -- Code(Expression(5, Sub)) at (prev + 2, 9) to (start + 0, 15) +- Code(Expression(4, Sub)) at (prev + 2, 9) to (start + 0, 15) = (c0 - (c1 + c2)) -- Code(Expression(0, Add)) at (prev + 3, 9) to (start + 0, 22) +- Code(Expression(16, Add)) at (prev + 3, 25) to (start + 0, 26) = (c1 + c2) -- Code(Expression(0, Add)) at (prev + 0, 25) to (start + 0, 26) +- Code(Expression(16, Add)) at (prev + 1, 8) to (start + 0, 12) = (c1 + c2) -- Code(Expression(0, Add)) at (prev + 1, 8) to (start + 0, 12) +- Code(Expression(16, Add)) at (prev + 1, 9) to (start + 0, 23) = (c1 + c2) -- Code(Expression(0, Add)) at (prev + 0, 13) to (start + 2, 6) - = (c1 + c2) -- Code(Zero) at (prev + 2, 5) to (start + 0, 6) -- Code(Expression(0, Add)) at (prev + 2, 8) to (start + 0, 21) +- Code(Zero) at (prev + 1, 5) to (start + 0, 6) +- Code(Expression(16, Add)) at (prev + 2, 8) to (start + 0, 21) = (c1 + c2) -- Code(Counter(3)) at (prev + 0, 22) to (start + 2, 6) -- Code(Expression(6, Sub)) at (prev + 2, 15) to (start + 0, 28) +- Code(Counter(3)) at (prev + 1, 9) to (start + 0, 23) +- Code(Expression(10, Sub)) at (prev + 1, 15) to (start + 0, 28) = ((c1 + c2) - c3) - Code(Counter(4)) at (prev + 1, 12) to (start + 0, 25) -- Code(Expression(7, Sub)) at (prev + 0, 29) to (start + 0, 42) +- Code(Expression(12, Sub)) at (prev + 0, 29) to (start + 0, 42) = (c4 - c18) -- Code(Expression(8, Sub)) at (prev + 0, 46) to (start + 0, 60) +- Code(Expression(13, Sub)) at (prev + 0, 46) to (start + 0, 60) = (c4 - (c18 + c19)) -- Code(Counter(4)) at (prev + 0, 61) to (start + 2, 10) -- Code(Zero) at (prev + 2, 9) to (start + 0, 10) +- Code(Counter(4)) at (prev + 1, 13) to (start + 0, 26) +- Code(Zero) at (prev + 1, 9) to (start + 0, 10) - Code(Counter(4)) at (prev + 1, 9) to (start + 0, 23) -- Code(Expression(10, Sub)) at (prev + 2, 9) to (start + 0, 15) +- Code(Expression(15, Sub)) at (prev + 2, 9) to (start + 0, 15) = ((c1 + c2) - (c3 + c4)) -- Code(Expression(24, Add)) at (prev + 3, 8) to (start + 0, 12) +- Code(Expression(29, Add)) at (prev + 3, 8) to (start + 0, 12) = (c3 + c4) -- Code(Expression(24, Add)) at (prev + 1, 13) to (start + 0, 26) +- Code(Expression(29, Add)) at (prev + 1, 29) to (start + 0, 30) = (c3 + c4) -- Code(Expression(24, Add)) at (prev + 0, 29) to (start + 0, 30) +- Code(Expression(29, Add)) at (prev + 1, 12) to (start + 0, 16) = (c3 + c4) -- Code(Expression(24, Add)) at (prev + 1, 12) to (start + 0, 16) +- Code(Expression(29, Add)) at (prev + 1, 13) to (start + 0, 27) = (c3 + c4) -- Code(Expression(24, Add)) at (prev + 0, 17) to (start + 2, 10) +- Code(Zero) at (prev + 1, 9) to (start + 0, 10) +- Code(Expression(29, Add)) at (prev + 2, 12) to (start + 0, 25) = (c3 + c4) -- Code(Zero) at (prev + 2, 9) to (start + 0, 10) -- Code(Expression(24, Add)) at (prev + 2, 12) to (start + 0, 25) - = (c3 + c4) -- Code(Counter(5)) at (prev + 0, 26) to (start + 2, 10) -- Code(Expression(18, Sub)) at (prev + 4, 17) to (start + 0, 30) +- Code(Counter(5)) at (prev + 1, 13) to (start + 0, 27) +- Code(Expression(23, Sub)) at (prev + 3, 17) to (start + 0, 30) = ((c3 + c4) - c5) - Code(Counter(6)) at (prev + 1, 16) to (start + 0, 29) -- Code(Expression(20, Sub)) at (prev + 0, 33) to (start + 0, 46) +- Code(Expression(25, Sub)) at (prev + 0, 33) to (start + 0, 46) = (c6 - c16) -- Code(Expression(21, Sub)) at (prev + 0, 50) to (start + 0, 64) +- Code(Expression(26, Sub)) at (prev + 0, 50) to (start + 0, 64) = (c6 - (c16 + c17)) -- Code(Counter(6)) at (prev + 0, 65) to (start + 2, 14) -- Code(Zero) at (prev + 2, 13) to (start + 0, 14) +- Code(Counter(6)) at (prev + 1, 17) to (start + 0, 30) +- Code(Zero) at (prev + 1, 13) to (start + 0, 14) - Code(Counter(6)) at (prev + 1, 13) to (start + 0, 27) -- Code(Expression(23, Sub)) at (prev + 2, 13) to (start + 0, 19) +- Code(Expression(28, Sub)) at (prev + 2, 13) to (start + 0, 19) = ((c3 + c4) - (c5 + c6)) - Code(Zero) at (prev + 2, 5) to (start + 0, 6) -- Code(Expression(47, Add)) at (prev + 2, 9) to (start + 0, 22) - = (c5 + c6) -- Code(Expression(47, Add)) at (prev + 0, 25) to (start + 0, 26) +- Code(Expression(50, Add)) at (prev + 2, 25) to (start + 0, 26) = (c5 + c6) -- Code(Expression(47, Add)) at (prev + 1, 8) to (start + 0, 12) +- Code(Expression(50, Add)) at (prev + 1, 8) to (start + 0, 12) = (c5 + c6) -- Code(Expression(47, Add)) at (prev + 0, 13) to (start + 2, 6) +- Code(Expression(50, Add)) at (prev + 1, 9) to (start + 0, 22) = (c5 + c6) -- Code(Zero) at (prev + 2, 5) to (start + 0, 6) -- Code(Expression(62, Add)) at (prev + 2, 9) to (start + 0, 10) - = (c7 + c8) -- Code(Expression(47, Add)) at (prev + 0, 16) to (start + 0, 29) +- Code(Zero) at (prev + 1, 5) to (start + 0, 6) +- Code(Expression(50, Add)) at (prev + 2, 16) to (start + 0, 29) = (c5 + c6) -- Code(Counter(7)) at (prev + 0, 30) to (start + 2, 6) -- Code(Expression(32, Sub)) at (prev + 2, 15) to (start + 0, 28) +- Code(Counter(7)) at (prev + 1, 9) to (start + 0, 23) +- Code(Expression(35, Sub)) at (prev + 1, 15) to (start + 0, 28) = ((c5 + c6) - c7) - Code(Counter(8)) at (prev + 1, 12) to (start + 0, 25) -- Code(Expression(34, Sub)) at (prev + 0, 29) to (start + 0, 42) +- Code(Expression(37, Sub)) at (prev + 0, 29) to (start + 0, 42) = (c8 - c14) -- Code(Expression(35, Sub)) at (prev + 0, 46) to (start + 0, 60) +- Code(Expression(38, Sub)) at (prev + 0, 46) to (start + 0, 60) = (c8 - (c14 + c15)) -- Code(Counter(8)) at (prev + 0, 61) to (start + 2, 10) -- Code(Zero) at (prev + 2, 9) to (start + 0, 10) +- Code(Counter(8)) at (prev + 1, 13) to (start + 0, 26) +- Code(Zero) at (prev + 1, 9) to (start + 0, 10) - Code(Counter(8)) at (prev + 1, 9) to (start + 0, 23) -- Code(Expression(46, Sub)) at (prev + 2, 13) to (start + 0, 32) +- Code(Expression(49, Sub)) at (prev + 2, 35) to (start + 0, 44) = ((c5 + c6) - (c7 + c8)) -- Code(Expression(46, Sub)) at (prev + 0, 35) to (start + 0, 44) +- Code(Expression(49, Sub)) at (prev + 1, 9) to (start + 0, 17) = ((c5 + c6) - (c7 + c8)) -- Code(Expression(46, Sub)) at (prev + 1, 9) to (start + 0, 17) +- Code(Expression(49, Sub)) at (prev + 0, 18) to (start + 0, 27) = ((c5 + c6) - (c7 + c8)) -- Code(Expression(46, Sub)) at (prev + 1, 9) to (start + 0, 15) +- Code(Expression(49, Sub)) at (prev + 1, 9) to (start + 0, 15) = ((c5 + c6) - (c7 + c8)) -- Code(Expression(63, Add)) at (prev + 3, 9) to (start + 0, 10) - = (c9 + c10) -- Code(Expression(62, Add)) at (prev + 0, 16) to (start + 0, 29) +- Code(Expression(64, Add)) at (prev + 3, 16) to (start + 0, 29) = (c7 + c8) -- Code(Counter(9)) at (prev + 0, 30) to (start + 2, 6) -- Code(Expression(51, Sub)) at (prev + 2, 15) to (start + 0, 28) +- Code(Counter(9)) at (prev + 1, 9) to (start + 0, 23) +- Code(Expression(53, Sub)) at (prev + 1, 15) to (start + 0, 28) = ((c7 + c8) - c9) - Code(Counter(10)) at (prev + 1, 12) to (start + 0, 25) -- Code(Expression(53, Sub)) at (prev + 0, 29) to (start + 0, 42) +- Code(Expression(55, Sub)) at (prev + 0, 29) to (start + 0, 42) = (c10 - c11) -- Code(Expression(54, Sub)) at (prev + 0, 46) to (start + 0, 60) +- Code(Expression(56, Sub)) at (prev + 0, 46) to (start + 0, 60) = (c10 - (c11 + c12)) -- Code(Expression(59, Add)) at (prev + 0, 61) to (start + 2, 10) +- Code(Expression(61, Add)) at (prev + 1, 13) to (start + 0, 26) = ((c11 + c12) + c13) -- Code(Expression(58, Sub)) at (prev + 2, 9) to (start + 0, 10) +- Code(Expression(60, Sub)) at (prev + 1, 9) to (start + 0, 10) = (c10 - ((c11 + c12) + c13)) - Code(Counter(10)) at (prev + 1, 9) to (start + 0, 23) -- Code(Expression(61, Sub)) at (prev + 2, 9) to (start + 0, 15) +- Code(Expression(63, Sub)) at (prev + 2, 9) to (start + 0, 15) = ((c7 + c8) - (c9 + c10)) - Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2) Highest counter ID seen: c10 diff --git a/tests/coverage/iffy/conditions.coverage b/tests/coverage/iffy/conditions.coverage index 83944d37c9808..3f4bd9b7afcbd 100644 --- a/tests/coverage/iffy/conditions.coverage +++ b/tests/coverage/iffy/conditions.coverage @@ -4,8 +4,7 @@ LL| 1| let mut countdown = 0; LL| 1| if true { LL| 1| countdown = 10; - LL| 1| } - ^0 + LL| 0| } LL| | LL| | const B: u32 = 100; LL| 1| let x = if countdown > 7 { @@ -24,13 +23,11 @@ LL| 1| let mut countdown = 0; LL| 1| if true { LL| 1| countdown = 10; - LL| 1| } - ^0 + LL| 0| } LL| | LL| 1| if countdown > 7 { LL| 1| countdown -= 4; - LL| 1| } else if countdown > 2 { - ^0 + LL| 0| } else if countdown > 2 { LL| 0| if countdown < 1 || countdown > 5 || countdown != 9 { LL| 0| countdown = 0; LL| 0| } @@ -43,12 +40,11 @@ LL| 1| let mut countdown = 0; LL| 1| if true { LL| 1| countdown = 10; - LL| 1| } - ^0 + LL| 0| } LL| | LL| 1| if countdown > 7 { LL| 1| countdown -= 4; - LL| 1| } + LL| | } LL| | // LL| 0| else if countdown > 2 { LL| 0| if countdown < 1 || countdown > 5 || countdown != 9 { @@ -63,11 +59,9 @@ LL| 1| let mut countdown = 0; LL| 1| if true { LL| 1| countdown = 1; - LL| 1| } - ^0 + LL| 0| } LL| | LL| 1| let z = if countdown > 7 { - ^0 LL| 0| countdown -= 4; LL| 1| } else if countdown > 2 { LL| 0| if countdown < 1 || countdown > 5 || countdown != 9 { diff --git a/tests/coverage/iffy/continue.cov-map b/tests/coverage/iffy/continue.cov-map index 05efd2707817a..f4da8e1a281e5 100644 --- a/tests/coverage/iffy/continue.cov-map +++ b/tests/coverage/iffy/continue.cov-map @@ -1,5 +1,5 @@ Function name: continue::main -Raw bytes (241): 0x[01, 01, 1a, 05, 01, 05, 13, 01, 09, 05, 13, 01, 09, 0d, 01, 0d, 27, 01, 11, 0d, 27, 01, 11, 15, 01, 15, 33, 01, 19, 1d, 01, 1d, 47, 01, 21, 1d, 47, 01, 21, 25, 01, 25, 53, 01, 29, 25, 01, 31, 01, 63, 31, 01, 2d, 31, 01, 25, 01, 03, 01, 00, 0a, 01, 01, 09, 00, 10, 01, 00, 13, 00, 2e, 01, 02, 09, 00, 0e, 01, 00, 11, 00, 12, 01, 01, 0e, 00, 13, 02, 01, 0f, 00, 16, 09, 02, 11, 00, 19, 0e, 02, 12, 02, 0e, 0e, 04, 09, 00, 0e, 01, 02, 0e, 00, 13, 16, 01, 0f, 00, 16, 22, 01, 16, 02, 0e, 11, 04, 11, 00, 19, 22, 03, 09, 00, 0e, 01, 02, 0e, 00, 13, 2a, 01, 0f, 00, 16, 19, 01, 15, 02, 0e, 2e, 04, 11, 00, 19, 19, 03, 09, 00, 0e, 01, 02, 0e, 00, 13, 36, 01, 0c, 00, 13, 21, 01, 0d, 00, 15, 42, 01, 09, 00, 0a, 42, 01, 09, 00, 0e, 01, 02, 0e, 00, 13, 56, 01, 0f, 00, 16, 4e, 01, 16, 02, 0e, 29, 03, 12, 02, 0e, 56, 04, 09, 00, 0e, 01, 02, 0e, 00, 13, 2d, 01, 0f, 00, 16, 66, 01, 16, 02, 0e, 5e, 04, 11, 00, 16, 66, 03, 09, 00, 0e, 01, 02, 0d, 00, 0e, 01, 01, 01, 00, 02] +Raw bytes (231): 0x[01, 01, 1a, 05, 01, 05, 13, 01, 09, 05, 13, 01, 09, 0d, 01, 0d, 27, 01, 11, 0d, 27, 01, 11, 15, 01, 15, 33, 01, 19, 1d, 01, 1d, 47, 01, 21, 1d, 47, 01, 21, 25, 01, 25, 53, 01, 29, 25, 01, 31, 01, 63, 31, 01, 2d, 31, 01, 23, 01, 03, 01, 00, 0a, 01, 01, 13, 00, 2e, 01, 02, 11, 00, 12, 01, 01, 0e, 00, 13, 02, 01, 0f, 00, 16, 09, 02, 11, 00, 19, 0e, 03, 11, 00, 16, 0e, 03, 09, 00, 0e, 01, 02, 0e, 00, 13, 16, 01, 0f, 00, 16, 22, 02, 11, 00, 16, 11, 03, 11, 00, 19, 22, 03, 09, 00, 0e, 01, 02, 0e, 00, 13, 2a, 01, 0f, 00, 16, 19, 02, 11, 00, 16, 2e, 03, 11, 00, 19, 19, 03, 09, 00, 0e, 01, 02, 0e, 00, 13, 36, 01, 0c, 00, 13, 21, 01, 0d, 00, 15, 42, 01, 09, 00, 0a, 42, 01, 09, 00, 0e, 01, 02, 0e, 00, 13, 56, 01, 0f, 00, 16, 4e, 02, 11, 00, 16, 29, 03, 19, 00, 1a, 56, 03, 09, 00, 0e, 01, 02, 0e, 00, 13, 2d, 01, 0f, 00, 16, 66, 02, 11, 00, 16, 5e, 03, 11, 00, 16, 66, 03, 09, 00, 0e, 01, 02, 0d, 00, 0e, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/continue.rs Number of expressions: 26 @@ -29,33 +29,31 @@ Number of expressions: 26 - expression 23 operands: lhs = Expression(24, Add), rhs = Counter(12) - expression 24 operands: lhs = Counter(0), rhs = Counter(11) - expression 25 operands: lhs = Counter(12), rhs = Counter(0) -Number of file 0 mappings: 37 +Number of file 0 mappings: 35 - Code(Counter(0)) at (prev + 3, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 19) to (start + 0, 46) -- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 18) +- Code(Counter(0)) at (prev + 1, 19) to (start + 0, 46) +- Code(Counter(0)) at (prev + 2, 17) to (start + 0, 18) - Code(Counter(0)) at (prev + 1, 14) to (start + 0, 19) - Code(Expression(0, Sub)) at (prev + 1, 15) to (start + 0, 22) = (c1 - c0) - Code(Counter(2)) at (prev + 2, 17) to (start + 0, 25) -- Code(Expression(3, Sub)) at (prev + 2, 18) to (start + 2, 14) +- Code(Expression(3, Sub)) at (prev + 3, 17) to (start + 0, 22) = (c1 - (c0 + c2)) -- Code(Expression(3, Sub)) at (prev + 4, 9) to (start + 0, 14) +- Code(Expression(3, Sub)) at (prev + 3, 9) to (start + 0, 14) = (c1 - (c0 + c2)) - Code(Counter(0)) at (prev + 2, 14) to (start + 0, 19) - Code(Expression(5, Sub)) at (prev + 1, 15) to (start + 0, 22) = (c3 - c0) -- Code(Expression(8, Sub)) at (prev + 1, 22) to (start + 2, 14) +- Code(Expression(8, Sub)) at (prev + 2, 17) to (start + 0, 22) = (c3 - (c0 + c4)) -- Code(Counter(4)) at (prev + 4, 17) to (start + 0, 25) +- Code(Counter(4)) at (prev + 3, 17) to (start + 0, 25) - Code(Expression(8, Sub)) at (prev + 3, 9) to (start + 0, 14) = (c3 - (c0 + c4)) - Code(Counter(0)) at (prev + 2, 14) to (start + 0, 19) - Code(Expression(10, Sub)) at (prev + 1, 15) to (start + 0, 22) = (c5 - c0) -- Code(Counter(6)) at (prev + 1, 21) to (start + 2, 14) -- Code(Expression(11, Sub)) at (prev + 4, 17) to (start + 0, 25) +- Code(Counter(6)) at (prev + 2, 17) to (start + 0, 22) +- Code(Expression(11, Sub)) at (prev + 3, 17) to (start + 0, 25) = (c5 - (c0 + c6)) - Code(Counter(6)) at (prev + 3, 9) to (start + 0, 14) - Code(Counter(0)) at (prev + 2, 14) to (start + 0, 19) @@ -69,16 +67,16 @@ Number of file 0 mappings: 37 - Code(Counter(0)) at (prev + 2, 14) to (start + 0, 19) - Code(Expression(21, Sub)) at (prev + 1, 15) to (start + 0, 22) = (c9 - c0) -- Code(Expression(19, Sub)) at (prev + 1, 22) to (start + 2, 14) +- Code(Expression(19, Sub)) at (prev + 2, 17) to (start + 0, 22) = (c9 - (c0 + c10)) -- Code(Counter(10)) at (prev + 3, 18) to (start + 2, 14) -- Code(Expression(21, Sub)) at (prev + 4, 9) to (start + 0, 14) +- Code(Counter(10)) at (prev + 3, 25) to (start + 0, 26) +- Code(Expression(21, Sub)) at (prev + 3, 9) to (start + 0, 14) = (c9 - c0) - Code(Counter(0)) at (prev + 2, 14) to (start + 0, 19) - Code(Counter(11)) at (prev + 1, 15) to (start + 0, 22) -- Code(Expression(25, Sub)) at (prev + 1, 22) to (start + 2, 14) +- Code(Expression(25, Sub)) at (prev + 2, 17) to (start + 0, 22) = (c12 - c0) -- Code(Expression(23, Sub)) at (prev + 4, 17) to (start + 0, 22) +- Code(Expression(23, Sub)) at (prev + 3, 17) to (start + 0, 22) = ((c0 + c11) - c12) - Code(Expression(25, Sub)) at (prev + 3, 9) to (start + 0, 14) = (c12 - c0) diff --git a/tests/coverage/iffy/continue.coverage b/tests/coverage/iffy/continue.coverage index 310701a1543cb..86233c8d98ad9 100644 --- a/tests/coverage/iffy/continue.coverage +++ b/tests/coverage/iffy/continue.coverage @@ -9,17 +9,17 @@ LL| | true => { LL| 10| continue; LL| | } - LL| 0| _ => { + LL| | _ => { LL| 0| x = 1; - LL| 0| } + LL| | } LL| | } LL| 0| x = 3; LL| | } LL| 1| for _ in 0..10 { LL| 10| match is_true { - LL| 0| false => { + LL| | false => { LL| 0| x = 1; - LL| 0| } + LL| | } LL| | _ => { LL| 10| continue; LL| | } @@ -28,9 +28,9 @@ LL| | } LL| 1| for _ in 0..10 { LL| 10| match is_true { - LL| 10| true => { + LL| | true => { LL| 10| x = 1; - LL| 10| } + LL| | } LL| | _ => { LL| 0| continue; LL| | } @@ -45,20 +45,20 @@ LL| | } LL| 1| for _ in 0..10 { LL| 10| match is_true { - LL| 0| false => { + LL| | false => { LL| 0| x = 1; - LL| 0| } - LL| 10| _ => { + LL| | } + LL| | _ => { LL| 10| let _ = x; - LL| 10| } + LL| | } LL| | } LL| 10| x = 3; LL| | } LL| 1| for _ in 0..10 { LL| 1| match is_true { - LL| 0| false => { + LL| | false => { LL| 0| x = 1; - LL| 0| } + LL| | } LL| | _ => { LL| 1| break; LL| | } diff --git a/tests/coverage/iffy/coroutine.cov-map b/tests/coverage/iffy/coroutine.cov-map index 9599af9f0ab2c..396d61909ce54 100644 --- a/tests/coverage/iffy/coroutine.cov-map +++ b/tests/coverage/iffy/coroutine.cov-map @@ -14,43 +14,35 @@ Number of file 0 mappings: 5 Highest counter ID seen: c1 Function name: coroutine::main -Raw bytes (93): 0x[01, 01, 02, 01, 05, 05, 09, 11, 01, 14, 01, 00, 0a, 01, 01, 09, 00, 10, 01, 00, 13, 00, 2e, 01, 01, 09, 00, 16, 01, 06, 0b, 00, 13, 01, 00, 14, 00, 22, 01, 00, 24, 00, 2a, 01, 00, 2b, 00, 2d, 05, 01, 2b, 00, 2d, 02, 01, 0e, 00, 14, 05, 02, 0b, 00, 2e, 05, 00, 0b, 00, 13, 05, 00, 14, 00, 22, 0d, 01, 22, 00, 27, 09, 00, 2c, 00, 2e, 06, 01, 0e, 00, 14, 09, 02, 01, 00, 02] +Raw bytes (53): 0x[01, 01, 02, 01, 05, 05, 09, 09, 01, 14, 01, 00, 0a, 01, 01, 13, 00, 2e, 01, 07, 0b, 00, 2e, 05, 01, 2b, 00, 2d, 02, 01, 0e, 00, 14, 05, 02, 0b, 00, 2e, 09, 01, 2c, 00, 2e, 06, 01, 0e, 00, 14, 09, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/coroutine.rs Number of expressions: 2 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) - expression 1 operands: lhs = Counter(1), rhs = Counter(2) -Number of file 0 mappings: 17 +Number of file 0 mappings: 9 - Code(Counter(0)) at (prev + 20, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 19) to (start + 0, 46) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 22) -- Code(Counter(0)) at (prev + 6, 11) to (start + 0, 19) -- Code(Counter(0)) at (prev + 0, 20) to (start + 0, 34) -- Code(Counter(0)) at (prev + 0, 36) to (start + 0, 42) -- Code(Counter(0)) at (prev + 0, 43) to (start + 0, 45) +- Code(Counter(0)) at (prev + 1, 19) to (start + 0, 46) +- Code(Counter(0)) at (prev + 7, 11) to (start + 0, 46) - Code(Counter(1)) at (prev + 1, 43) to (start + 0, 45) - Code(Expression(0, Sub)) at (prev + 1, 14) to (start + 0, 20) = (c0 - c1) - Code(Counter(1)) at (prev + 2, 11) to (start + 0, 46) -- Code(Counter(1)) at (prev + 0, 11) to (start + 0, 19) -- Code(Counter(1)) at (prev + 0, 20) to (start + 0, 34) -- Code(Counter(3)) at (prev + 1, 34) to (start + 0, 39) -- Code(Counter(2)) at (prev + 0, 44) to (start + 0, 46) +- Code(Counter(2)) at (prev + 1, 44) to (start + 0, 46) - Code(Expression(1, Sub)) at (prev + 1, 14) to (start + 0, 20) = (c1 - c2) - Code(Counter(2)) at (prev + 2, 1) to (start + 0, 2) -Highest counter ID seen: c3 +Highest counter ID seen: c2 Function name: coroutine::main::{closure#0} -Raw bytes (24): 0x[01, 01, 00, 04, 01, 17, 08, 00, 09, 01, 01, 09, 00, 1f, 05, 01, 10, 00, 15, 05, 01, 05, 00, 06] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 17, 08, 00, 09, 01, 01, 09, 00, 1f, 05, 01, 09, 00, 15, 05, 01, 05, 00, 06] Number of files: 1 - file 0 => $DIR/coroutine.rs Number of expressions: 0 Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 23, 8) to (start + 0, 9) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 31) -- Code(Counter(1)) at (prev + 1, 16) to (start + 0, 21) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 21) - Code(Counter(1)) at (prev + 1, 5) to (start + 0, 6) Highest counter ID seen: c1 diff --git a/tests/coverage/iffy/coroutine.coverage b/tests/coverage/iffy/coroutine.coverage index 02fc91bcf5863..e29009509595e 100644 --- a/tests/coverage/iffy/coroutine.coverage +++ b/tests/coverage/iffy/coroutine.coverage @@ -19,7 +19,7 @@ LL| | LL| 1|fn main() { LL| 1| let is_true = std::env::args().len() == 1; - LL| 1| let mut coroutine = #[coroutine] + LL| | let mut coroutine = #[coroutine] LL| 1| || { LL| 1| yield get_u32(is_true); LL| 1| return "foo"; diff --git a/tests/coverage/iffy/drop_trait.cov-map b/tests/coverage/iffy/drop_trait.cov-map index b4a1499d5f95f..23c1962cbdbe3 100644 --- a/tests/coverage/iffy/drop_trait.cov-map +++ b/tests/coverage/iffy/drop_trait.cov-map @@ -1,28 +1,28 @@ Function name: ::drop -Raw bytes (19): 0x[01, 01, 00, 03, 01, 09, 05, 00, 17, 01, 01, 09, 00, 11, 01, 01, 05, 00, 06] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 09, 05, 00, 17, 01, 01, 09, 00, 11, 01, 00, 26, 00, 33, 01, 01, 05, 00, 06] Number of files: 1 - file 0 => $DIR/drop_trait.rs Number of expressions: 0 -Number of file 0 mappings: 3 +Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 9, 5) to (start + 0, 23) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 17) +- Code(Counter(0)) at (prev + 0, 38) to (start + 0, 51) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 6) Highest counter ID seen: c0 Function name: drop_trait::main -Raw bytes (64): 0x[01, 01, 00, 0c, 01, 0e, 01, 00, 1c, 01, 01, 09, 00, 15, 01, 00, 18, 00, 30, 01, 02, 09, 00, 0d, 01, 00, 10, 00, 2a, 01, 02, 08, 00, 0c, 01, 01, 09, 00, 11, 01, 01, 10, 00, 16, 00, 01, 05, 00, 06, 00, 02, 0d, 00, 28, 00, 02, 05, 00, 0b, 01, 01, 01, 00, 02] +Raw bytes (59): 0x[01, 01, 00, 0b, 01, 0e, 01, 00, 1c, 01, 01, 18, 00, 30, 01, 02, 10, 00, 2a, 01, 02, 08, 00, 0c, 01, 01, 09, 00, 11, 01, 00, 12, 00, 29, 01, 01, 09, 00, 16, 00, 01, 05, 00, 06, 00, 02, 0d, 00, 28, 00, 02, 05, 00, 0b, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/drop_trait.rs Number of expressions: 0 -Number of file 0 mappings: 12 +Number of file 0 mappings: 11 - Code(Counter(0)) at (prev + 14, 1) to (start + 0, 28) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 21) -- Code(Counter(0)) at (prev + 0, 24) to (start + 0, 48) -- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 13) -- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 42) +- Code(Counter(0)) at (prev + 1, 24) to (start + 0, 48) +- Code(Counter(0)) at (prev + 2, 16) to (start + 0, 42) - Code(Counter(0)) at (prev + 2, 8) to (start + 0, 12) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 17) -- Code(Counter(0)) at (prev + 1, 16) to (start + 0, 22) +- Code(Counter(0)) at (prev + 0, 18) to (start + 0, 41) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 22) - Code(Zero) at (prev + 1, 5) to (start + 0, 6) - Code(Zero) at (prev + 2, 13) to (start + 0, 40) - Code(Zero) at (prev + 2, 5) to (start + 0, 11) diff --git a/tests/coverage/iffy/generics.cov-map b/tests/coverage/iffy/generics.cov-map index 0d9cf9a1449b3..5c3b86294a1b4 100644 --- a/tests/coverage/iffy/generics.cov-map +++ b/tests/coverage/iffy/generics.cov-map @@ -1,11 +1,12 @@ Function name: as core::ops::drop::Drop>::drop -Raw bytes (19): 0x[01, 01, 00, 03, 01, 11, 05, 00, 17, 01, 01, 09, 00, 11, 01, 01, 05, 00, 06] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 11, 05, 00, 17, 01, 01, 09, 00, 11, 01, 00, 26, 00, 33, 01, 01, 05, 00, 06] Number of files: 1 - file 0 => $DIR/generics.rs Number of expressions: 0 -Number of file 0 mappings: 3 +Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 17, 5) to (start + 0, 23) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 17) +- Code(Counter(0)) at (prev + 0, 38) to (start + 0, 51) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 6) Highest counter ID seen: c0 @@ -21,13 +22,14 @@ Number of file 0 mappings: 3 Highest counter ID seen: c0 Function name: as core::ops::drop::Drop>::drop -Raw bytes (19): 0x[01, 01, 00, 03, 01, 11, 05, 00, 17, 01, 01, 09, 00, 11, 01, 01, 05, 00, 06] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 11, 05, 00, 17, 01, 01, 09, 00, 11, 01, 00, 26, 00, 33, 01, 01, 05, 00, 06] Number of files: 1 - file 0 => $DIR/generics.rs Number of expressions: 0 -Number of file 0 mappings: 3 +Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 17, 5) to (start + 0, 23) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 17) +- Code(Counter(0)) at (prev + 0, 38) to (start + 0, 51) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 6) Highest counter ID seen: c0 @@ -43,25 +45,21 @@ Number of file 0 mappings: 3 Highest counter ID seen: c0 Function name: generics::main -Raw bytes (94): 0x[01, 01, 00, 12, 01, 16, 01, 00, 1c, 01, 01, 09, 00, 18, 01, 00, 1b, 00, 33, 01, 01, 05, 00, 10, 01, 00, 11, 00, 1d, 01, 02, 09, 00, 10, 01, 00, 13, 00, 2f, 01, 01, 05, 00, 08, 01, 00, 09, 00, 15, 01, 01, 05, 00, 08, 01, 00, 09, 00, 15, 01, 02, 08, 00, 0c, 01, 01, 09, 00, 11, 01, 01, 10, 00, 16, 00, 01, 05, 00, 06, 00, 02, 0d, 00, 28, 00, 02, 05, 00, 0b, 01, 01, 01, 00, 02] +Raw bytes (74): 0x[01, 01, 00, 0e, 01, 16, 01, 00, 1c, 01, 01, 1b, 00, 33, 01, 01, 05, 00, 20, 01, 02, 13, 00, 2f, 01, 01, 05, 00, 1c, 01, 01, 05, 00, 1c, 01, 02, 08, 00, 0c, 01, 01, 09, 00, 11, 01, 00, 12, 00, 29, 01, 01, 09, 00, 16, 00, 01, 05, 00, 06, 00, 02, 0d, 00, 28, 00, 02, 05, 00, 0b, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/generics.rs Number of expressions: 0 -Number of file 0 mappings: 18 +Number of file 0 mappings: 14 - Code(Counter(0)) at (prev + 22, 1) to (start + 0, 28) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 24) -- Code(Counter(0)) at (prev + 0, 27) to (start + 0, 51) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 29) -- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 19) to (start + 0, 47) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 8) -- Code(Counter(0)) at (prev + 0, 9) to (start + 0, 21) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 8) -- Code(Counter(0)) at (prev + 0, 9) to (start + 0, 21) +- Code(Counter(0)) at (prev + 1, 27) to (start + 0, 51) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 32) +- Code(Counter(0)) at (prev + 2, 19) to (start + 0, 47) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 28) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 28) - Code(Counter(0)) at (prev + 2, 8) to (start + 0, 12) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 17) -- Code(Counter(0)) at (prev + 1, 16) to (start + 0, 22) +- Code(Counter(0)) at (prev + 0, 18) to (start + 0, 41) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 22) - Code(Zero) at (prev + 1, 5) to (start + 0, 6) - Code(Zero) at (prev + 2, 13) to (start + 0, 40) - Code(Zero) at (prev + 2, 5) to (start + 0, 11) diff --git a/tests/coverage/iffy/if.cov-map b/tests/coverage/iffy/if.cov-map index 044c0f2ba0894..756383cacb5b7 100644 --- a/tests/coverage/iffy/if.cov-map +++ b/tests/coverage/iffy/if.cov-map @@ -1,18 +1,16 @@ Function name: if::main -Raw bytes (51): 0x[01, 01, 01, 01, 05, 09, 01, 04, 01, 00, 0a, 01, 05, 05, 00, 0c, 01, 02, 09, 02, 0a, 01, 05, 09, 01, 0e, 01, 03, 09, 00, 0a, 01, 03, 09, 00, 10, 05, 01, 05, 05, 06, 02, 05, 05, 00, 06, 01, 01, 01, 00, 02] +Raw bytes (41): 0x[01, 01, 01, 01, 05, 07, 01, 04, 01, 00, 0a, 01, 07, 09, 02, 0a, 01, 08, 09, 00, 0a, 01, 03, 09, 00, 10, 05, 02, 09, 02, 0f, 02, 04, 05, 00, 06, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/if.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 9 +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 4, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 5, 5) to (start + 0, 12) -- Code(Counter(0)) at (prev + 2, 9) to (start + 2, 10) -- Code(Counter(0)) at (prev + 5, 9) to (start + 1, 14) -- Code(Counter(0)) at (prev + 3, 9) to (start + 0, 10) +- Code(Counter(0)) at (prev + 7, 9) to (start + 2, 10) +- Code(Counter(0)) at (prev + 8, 9) to (start + 0, 10) - Code(Counter(0)) at (prev + 3, 9) to (start + 0, 16) -- Code(Counter(1)) at (prev + 1, 5) to (start + 5, 6) -- Code(Expression(0, Sub)) at (prev + 5, 5) to (start + 0, 6) +- Code(Counter(1)) at (prev + 2, 9) to (start + 2, 15) +- Code(Expression(0, Sub)) at (prev + 4, 5) to (start + 0, 6) = (c0 - c1) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c1 diff --git a/tests/coverage/iffy/if.coverage b/tests/coverage/iffy/if.coverage index c3c8a1bf38a48..5c670152491f7 100644 --- a/tests/coverage/iffy/if.coverage +++ b/tests/coverage/iffy/if.coverage @@ -6,26 +6,25 @@ LL| | // rustc and LLVM cannot optimize out statements (or coverage counters) downstream from LL| | // dependent conditions. LL| | let - LL| 1| is_true + LL| | is_true LL| | = LL| 1| std::env::args().len() LL| 1| == LL| 1| 1 LL| | ; LL| | let - LL| 1| mut - LL| 1| countdown + LL| | mut + LL| | countdown LL| | = LL| 1| 0 LL| | ; LL| | if LL| 1| is_true - LL| 1| { + LL| | { LL| 1| countdown LL| 1| = LL| 1| 10 - LL| 1| ; - LL| 1| } - ^0 + LL| | ; + LL| 0| } LL| 1|} diff --git a/tests/coverage/iffy/if_else.cov-map b/tests/coverage/iffy/if_else.cov-map index 1d8ca1809532f..0ffc220286e10 100644 --- a/tests/coverage/iffy/if_else.cov-map +++ b/tests/coverage/iffy/if_else.cov-map @@ -1,24 +1,22 @@ Function name: if_else::main -Raw bytes (68): 0x[01, 01, 02, 01, 05, 01, 09, 0c, 01, 04, 01, 00, 0a, 01, 04, 09, 00, 10, 01, 00, 13, 00, 2e, 01, 02, 09, 00, 16, 01, 00, 19, 00, 1a, 01, 02, 09, 00, 10, 05, 01, 05, 05, 06, 02, 08, 09, 02, 10, 01, 06, 09, 00, 10, 09, 01, 05, 05, 06, 06, 07, 05, 05, 06, 01, 06, 01, 00, 02] +Raw bytes (58): 0x[01, 01, 02, 01, 05, 01, 09, 0a, 01, 04, 01, 00, 0a, 01, 04, 13, 00, 2e, 01, 02, 19, 00, 1a, 01, 02, 09, 00, 10, 05, 02, 09, 02, 0f, 02, 07, 09, 02, 10, 01, 06, 09, 00, 10, 09, 02, 09, 02, 0f, 06, 07, 09, 02, 10, 01, 05, 01, 00, 02] Number of files: 1 - file 0 => $DIR/if_else.rs Number of expressions: 2 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) - expression 1 operands: lhs = Counter(0), rhs = Counter(2) -Number of file 0 mappings: 12 +Number of file 0 mappings: 10 - Code(Counter(0)) at (prev + 4, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 4, 9) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 19) to (start + 0, 46) -- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 22) -- Code(Counter(0)) at (prev + 0, 25) to (start + 0, 26) +- Code(Counter(0)) at (prev + 4, 19) to (start + 0, 46) +- Code(Counter(0)) at (prev + 2, 25) to (start + 0, 26) - Code(Counter(0)) at (prev + 2, 9) to (start + 0, 16) -- Code(Counter(1)) at (prev + 1, 5) to (start + 5, 6) -- Code(Expression(0, Sub)) at (prev + 8, 9) to (start + 2, 16) +- Code(Counter(1)) at (prev + 2, 9) to (start + 2, 15) +- Code(Expression(0, Sub)) at (prev + 7, 9) to (start + 2, 16) = (c0 - c1) - Code(Counter(0)) at (prev + 6, 9) to (start + 0, 16) -- Code(Counter(2)) at (prev + 1, 5) to (start + 5, 6) -- Code(Expression(1, Sub)) at (prev + 7, 5) to (start + 5, 6) +- Code(Counter(2)) at (prev + 2, 9) to (start + 2, 15) +- Code(Expression(1, Sub)) at (prev + 7, 9) to (start + 2, 16) = (c0 - c2) -- Code(Counter(0)) at (prev + 6, 1) to (start + 0, 2) +- Code(Counter(0)) at (prev + 5, 1) to (start + 0, 2) Highest counter ID seen: c2 diff --git a/tests/coverage/iffy/if_else.coverage b/tests/coverage/iffy/if_else.coverage index 148e2b1951739..9d3e6f5ecc84a 100644 --- a/tests/coverage/iffy/if_else.coverage +++ b/tests/coverage/iffy/if_else.coverage @@ -10,12 +10,12 @@ LL| 1| let mut countdown = 0; LL| | if LL| 1| is_true - LL| 1| { + LL| | { LL| 1| countdown LL| 1| = LL| 1| 10 - LL| 1| ; - LL| 1| } + LL| | ; + LL| | } LL| | else // Note coverage region difference without semicolon LL| | { LL| 0| countdown @@ -25,18 +25,18 @@ LL| | LL| | if LL| 1| is_true - LL| 1| { + LL| | { LL| 1| countdown LL| 1| = LL| 1| 10 - LL| 1| ; - LL| 1| } + LL| | ; + LL| | } LL| | else - LL| 0| { + LL| | { LL| 0| countdown LL| 0| = LL| 0| 100 - LL| 0| ; - LL| 0| } + LL| | ; + LL| | } LL| 1|} diff --git a/tests/coverage/iffy/inline-dead.cov-map b/tests/coverage/iffy/inline-dead.cov-map index c461b3a6eedcc..0769f743034d5 100644 --- a/tests/coverage/iffy/inline-dead.cov-map +++ b/tests/coverage/iffy/inline-dead.cov-map @@ -10,7 +10,7 @@ Number of file 0 mappings: 3 Highest counter ID seen: (none) Function name: inline_dead::live:: -Raw bytes (31): 0x[01, 01, 01, 01, 05, 05, 01, 0e, 01, 00, 20, 01, 01, 08, 00, 09, 05, 01, 09, 00, 0d, 02, 02, 09, 00, 0a, 01, 02, 01, 00, 02] +Raw bytes (31): 0x[01, 01, 01, 01, 05, 05, 01, 0e, 01, 00, 20, 01, 01, 08, 00, 09, 05, 01, 09, 00, 0f, 02, 02, 09, 00, 0a, 01, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/inline-dead.rs Number of expressions: 1 @@ -18,23 +18,22 @@ Number of expressions: 1 Number of file 0 mappings: 5 - Code(Counter(0)) at (prev + 14, 1) to (start + 0, 32) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 9) -- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 13) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 15) - Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 10) = (c0 - c1) - Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2) Highest counter ID seen: c1 Function name: inline_dead::main -Raw bytes (34): 0x[01, 01, 00, 06, 01, 04, 01, 00, 0a, 01, 01, 05, 00, 0d, 01, 00, 14, 00, 21, 01, 02, 09, 00, 0a, 01, 03, 05, 00, 0d, 01, 01, 01, 00, 02] +Raw bytes (29): 0x[01, 01, 00, 05, 01, 04, 01, 00, 0a, 01, 01, 05, 00, 0d, 01, 00, 14, 00, 23, 01, 05, 05, 00, 0d, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/inline-dead.rs Number of expressions: 0 -Number of file 0 mappings: 6 +Number of file 0 mappings: 5 - Code(Counter(0)) at (prev + 4, 1) to (start + 0, 10) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) -- Code(Counter(0)) at (prev + 0, 20) to (start + 0, 33) -- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 10) -- Code(Counter(0)) at (prev + 3, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 20) to (start + 0, 35) +- Code(Counter(0)) at (prev + 5, 5) to (start + 0, 13) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/iffy/inline.cov-map b/tests/coverage/iffy/inline.cov-map index 55f4b8484c024..ddb9d3152f866 100644 --- a/tests/coverage/iffy/inline.cov-map +++ b/tests/coverage/iffy/inline.cov-map @@ -1,59 +1,59 @@ Function name: inline::display:: -Raw bytes (36): 0x[01, 01, 01, 05, 01, 06, 01, 29, 01, 00, 21, 02, 01, 09, 00, 0a, 01, 00, 0e, 00, 10, 02, 00, 11, 02, 06, 01, 03, 05, 00, 0d, 01, 01, 01, 00, 02] +Raw bytes (36): 0x[01, 01, 01, 05, 01, 06, 01, 2a, 01, 00, 21, 01, 01, 0e, 00, 10, 02, 01, 09, 00, 0f, 02, 00, 16, 00, 17, 01, 02, 05, 00, 0d, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/inline.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(1), rhs = Counter(0) Number of file 0 mappings: 6 -- Code(Counter(0)) at (prev + 41, 1) to (start + 0, 33) -- Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 10) +- Code(Counter(0)) at (prev + 42, 1) to (start + 0, 33) +- Code(Counter(0)) at (prev + 1, 14) to (start + 0, 16) +- Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 15) = (c1 - c0) -- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 16) -- Code(Expression(0, Sub)) at (prev + 0, 17) to (start + 2, 6) +- Code(Expression(0, Sub)) at (prev + 0, 22) to (start + 0, 23) = (c1 - c0) -- Code(Counter(0)) at (prev + 3, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 13) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: inline::error -Raw bytes (14): 0x[01, 01, 00, 02, 01, 31, 01, 00, 0b, 01, 01, 05, 00, 0b] +Raw bytes (14): 0x[01, 01, 00, 02, 01, 32, 01, 00, 0b, 01, 01, 05, 00, 0b] Number of files: 1 - file 0 => $DIR/inline.rs Number of expressions: 0 Number of file 0 mappings: 2 -- Code(Counter(0)) at (prev + 49, 1) to (start + 0, 11) +- Code(Counter(0)) at (prev + 50, 1) to (start + 0, 11) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 11) Highest counter ID seen: c0 Function name: inline::length:: -Raw bytes (24): 0x[01, 01, 00, 04, 01, 1e, 01, 00, 20, 01, 01, 05, 00, 07, 01, 00, 08, 00, 0b, 01, 01, 01, 00, 02] +Raw bytes (19): 0x[01, 01, 00, 03, 01, 1f, 01, 00, 20, 01, 01, 05, 00, 0d, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/inline.rs Number of expressions: 0 -Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 30, 1) to (start + 0, 32) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 7) -- Code(Counter(0)) at (prev + 0, 8) to (start + 0, 11) +Number of file 0 mappings: 3 +- Code(Counter(0)) at (prev + 31, 1) to (start + 0, 32) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: inline::main -Raw bytes (24): 0x[01, 01, 00, 04, 01, 05, 01, 00, 0a, 01, 01, 05, 00, 11, 01, 00, 12, 00, 22, 01, 01, 01, 00, 02] +Raw bytes (29): 0x[01, 01, 00, 05, 01, 06, 01, 00, 0a, 01, 01, 05, 00, 23, 01, 00, 05, 00, 11, 01, 00, 14, 00, 17, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/inline.rs Number of expressions: 0 -Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 5, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 17) -- Code(Counter(0)) at (prev + 0, 18) to (start + 0, 34) +Number of file 0 mappings: 5 +- Code(Counter(0)) at (prev + 6, 1) to (start + 0, 10) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 35) +- Code(Counter(0)) at (prev + 0, 5) to (start + 0, 17) +- Code(Counter(0)) at (prev + 0, 20) to (start + 0, 23) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: inline::permutate:: -Raw bytes (137): 0x[01, 01, 0e, 01, 05, 0d, 09, 0d, 09, 0d, 09, 0d, 09, 0d, 09, 0d, 09, 0d, 09, 0d, 09, 0d, 09, 0d, 09, 0d, 09, 01, 37, 05, 09, 15, 01, 0f, 01, 00, 38, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 13, 01, 00, 14, 00, 16, 01, 01, 08, 00, 0e, 05, 00, 0f, 02, 06, 02, 02, 0f, 00, 14, 2e, 01, 0d, 00, 0e, 09, 00, 12, 00, 16, 2e, 00, 17, 04, 0a, 2e, 01, 0d, 00, 11, 2e, 00, 12, 00, 14, 2e, 00, 16, 00, 17, 2e, 00, 19, 00, 1a, 2e, 01, 0d, 00, 16, 2e, 00, 17, 00, 19, 2e, 00, 1b, 00, 20, 2e, 01, 0d, 00, 11, 2e, 00, 12, 00, 14, 32, 02, 0c, 02, 06, 01, 03, 01, 00, 02] +Raw bytes (113): 0x[01, 01, 0c, 01, 05, 0d, 09, 0d, 09, 0d, 09, 0d, 09, 0d, 09, 0d, 09, 0d, 09, 0d, 09, 0d, 09, 01, 2f, 05, 09, 11, 01, 10, 01, 00, 38, 01, 01, 0d, 00, 17, 01, 01, 08, 00, 0e, 05, 01, 09, 00, 14, 02, 01, 0f, 00, 14, 09, 01, 12, 00, 16, 26, 01, 0d, 00, 1b, 26, 00, 0d, 00, 11, 26, 00, 12, 00, 14, 26, 01, 0d, 00, 21, 26, 00, 0d, 00, 16, 26, 00, 17, 00, 19, 26, 01, 0d, 00, 1b, 26, 00, 0d, 00, 11, 26, 00, 12, 00, 14, 2a, 03, 09, 00, 10, 01, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/inline.rs -Number of expressions: 14 +Number of expressions: 12 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) - expression 1 operands: lhs = Counter(3), rhs = Counter(2) - expression 2 operands: lhs = Counter(3), rhs = Counter(2) @@ -64,72 +64,62 @@ Number of expressions: 14 - expression 7 operands: lhs = Counter(3), rhs = Counter(2) - expression 8 operands: lhs = Counter(3), rhs = Counter(2) - expression 9 operands: lhs = Counter(3), rhs = Counter(2) -- expression 10 operands: lhs = Counter(3), rhs = Counter(2) -- expression 11 operands: lhs = Counter(3), rhs = Counter(2) -- expression 12 operands: lhs = Counter(0), rhs = Expression(13, Add) -- expression 13 operands: lhs = Counter(1), rhs = Counter(2) -Number of file 0 mappings: 21 -- Code(Counter(0)) at (prev + 15, 1) to (start + 0, 56) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10) -- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 19) -- Code(Counter(0)) at (prev + 0, 20) to (start + 0, 22) +- expression 10 operands: lhs = Counter(0), rhs = Expression(11, Add) +- expression 11 operands: lhs = Counter(1), rhs = Counter(2) +Number of file 0 mappings: 17 +- Code(Counter(0)) at (prev + 16, 1) to (start + 0, 56) +- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 23) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 14) -- Code(Counter(1)) at (prev + 0, 15) to (start + 2, 6) -- Code(Expression(0, Sub)) at (prev + 2, 15) to (start + 0, 20) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 20) +- Code(Expression(0, Sub)) at (prev + 1, 15) to (start + 0, 20) = (c0 - c1) -- Code(Expression(11, Sub)) at (prev + 1, 13) to (start + 0, 14) +- Code(Counter(2)) at (prev + 1, 18) to (start + 0, 22) +- Code(Expression(9, Sub)) at (prev + 1, 13) to (start + 0, 27) = (c3 - c2) -- Code(Counter(2)) at (prev + 0, 18) to (start + 0, 22) -- Code(Expression(11, Sub)) at (prev + 0, 23) to (start + 4, 10) +- Code(Expression(9, Sub)) at (prev + 0, 13) to (start + 0, 17) = (c3 - c2) -- Code(Expression(11, Sub)) at (prev + 1, 13) to (start + 0, 17) +- Code(Expression(9, Sub)) at (prev + 0, 18) to (start + 0, 20) = (c3 - c2) -- Code(Expression(11, Sub)) at (prev + 0, 18) to (start + 0, 20) +- Code(Expression(9, Sub)) at (prev + 1, 13) to (start + 0, 33) = (c3 - c2) -- Code(Expression(11, Sub)) at (prev + 0, 22) to (start + 0, 23) +- Code(Expression(9, Sub)) at (prev + 0, 13) to (start + 0, 22) = (c3 - c2) -- Code(Expression(11, Sub)) at (prev + 0, 25) to (start + 0, 26) +- Code(Expression(9, Sub)) at (prev + 0, 23) to (start + 0, 25) = (c3 - c2) -- Code(Expression(11, Sub)) at (prev + 1, 13) to (start + 0, 22) +- Code(Expression(9, Sub)) at (prev + 1, 13) to (start + 0, 27) = (c3 - c2) -- Code(Expression(11, Sub)) at (prev + 0, 23) to (start + 0, 25) +- Code(Expression(9, Sub)) at (prev + 0, 13) to (start + 0, 17) = (c3 - c2) -- Code(Expression(11, Sub)) at (prev + 0, 27) to (start + 0, 32) +- Code(Expression(9, Sub)) at (prev + 0, 18) to (start + 0, 20) = (c3 - c2) -- Code(Expression(11, Sub)) at (prev + 1, 13) to (start + 0, 17) - = (c3 - c2) -- Code(Expression(11, Sub)) at (prev + 0, 18) to (start + 0, 20) - = (c3 - c2) -- Code(Expression(12, Sub)) at (prev + 2, 12) to (start + 2, 6) +- Code(Expression(10, Sub)) at (prev + 3, 9) to (start + 0, 16) = (c0 - (c1 + c2)) -- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2) +- Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2) Highest counter ID seen: c2 Function name: inline::permutations:: -Raw bytes (39): 0x[01, 01, 00, 07, 01, 0a, 01, 00, 2d, 01, 01, 09, 00, 0f, 01, 00, 12, 00, 14, 01, 00, 15, 00, 1d, 01, 01, 05, 00, 0e, 01, 00, 0f, 00, 16, 01, 01, 01, 00, 02] +Raw bytes (29): 0x[01, 01, 00, 05, 01, 0b, 01, 00, 2d, 01, 01, 12, 00, 1f, 01, 01, 05, 00, 1a, 01, 00, 05, 00, 0e, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/inline.rs Number of expressions: 0 -Number of file 0 mappings: 7 -- Code(Counter(0)) at (prev + 10, 1) to (start + 0, 45) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 15) -- Code(Counter(0)) at (prev + 0, 18) to (start + 0, 20) -- Code(Counter(0)) at (prev + 0, 21) to (start + 0, 29) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 22) +Number of file 0 mappings: 5 +- Code(Counter(0)) at (prev + 11, 1) to (start + 0, 45) +- Code(Counter(0)) at (prev + 1, 18) to (start + 0, 31) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 26) +- Code(Counter(0)) at (prev + 0, 5) to (start + 0, 14) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: inline::swap:: -Raw bytes (34): 0x[01, 01, 00, 06, 01, 23, 01, 00, 33, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 12, 01, 01, 05, 00, 12, 01, 01, 05, 00, 0e, 01, 01, 01, 00, 02] +Raw bytes (34): 0x[01, 01, 00, 06, 01, 24, 01, 00, 33, 01, 01, 0d, 00, 12, 01, 01, 05, 00, 12, 01, 00, 05, 00, 0a, 01, 01, 05, 00, 0e, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/inline.rs Number of expressions: 0 Number of file 0 mappings: 6 -- Code(Counter(0)) at (prev + 35, 1) to (start + 0, 51) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10) -- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 18) +- Code(Counter(0)) at (prev + 36, 1) to (start + 0, 51) +- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 18) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 18) +- Code(Counter(0)) at (prev + 0, 5) to (start + 0, 10) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/iffy/inline.coverage b/tests/coverage/iffy/inline.coverage index 190d5a3a22b1f..d0367f301a840 100644 --- a/tests/coverage/iffy/inline.coverage +++ b/tests/coverage/iffy/inline.coverage @@ -1,4 +1,5 @@ LL| |//@ compile-flags: -Zinline-mir + LL| |//@ min-llvm-version: 23 LL| | LL| |use std::fmt::Display; LL| | @@ -17,15 +18,14 @@ LL| 16| if k == n { LL| 6| display(xs); LL| 10| } else if k < n { - LL| 15| for i in k..n { - ^10 + LL| 10| for i in k..n { LL| 15| swap(xs, i, k); LL| 15| permutate(xs, k + 1); LL| 15| swap(xs, i, k); - LL| 15| } - LL| 0| } else { + LL| | } + LL| | } else { LL| 0| error(); - LL| 0| } + LL| | } LL| 16|} LL| | LL| 16|fn length(xs: &[T]) -> usize { @@ -40,10 +40,9 @@ LL| 30|} LL| | LL| 6|fn display(xs: &[T]) { - LL| 18| for x in xs { - ^6 + LL| 6| for x in xs { LL| 18| print!("{}", x); - LL| 18| } + LL| | } LL| 6| println!(); LL| 6|} LL| | diff --git a/tests/coverage/iffy/inline.rs b/tests/coverage/iffy/inline.rs index 04a308ea5dd96..2defc0a68626f 100644 --- a/tests/coverage/iffy/inline.rs +++ b/tests/coverage/iffy/inline.rs @@ -1,4 +1,5 @@ //@ compile-flags: -Zinline-mir +//@ min-llvm-version: 23 use std::fmt::Display; diff --git a/tests/coverage/iffy/inner_items.cov-map b/tests/coverage/iffy/inner_items.cov-map index 0e3ed47bbc67c..c207453946035 100644 --- a/tests/coverage/iffy/inner_items.cov-map +++ b/tests/coverage/iffy/inner_items.cov-map @@ -1,69 +1,62 @@ Function name: ::default_trait_func -Raw bytes (29): 0x[01, 01, 00, 05, 01, 21, 09, 00, 29, 01, 01, 0d, 00, 14, 01, 01, 0d, 00, 11, 01, 00, 12, 00, 1c, 01, 01, 09, 00, 0a] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 21, 09, 00, 29, 01, 01, 0d, 00, 1e, 01, 01, 0d, 00, 26, 01, 01, 09, 00, 0a] Number of files: 1 - file 0 => $DIR/inner_items.rs Number of expressions: 0 -Number of file 0 mappings: 5 +Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 33, 9) to (start + 0, 41) -- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 20) -- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 17) -- Code(Counter(0)) at (prev + 0, 18) to (start + 0, 28) +- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 30) +- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 38) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10) Highest counter ID seen: c0 Function name: ::trait_func -Raw bytes (29): 0x[01, 01, 00, 05, 01, 28, 09, 00, 2c, 01, 01, 0d, 00, 29, 01, 01, 0d, 00, 14, 01, 00, 15, 00, 29, 01, 01, 09, 00, 0a] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 28, 09, 00, 2c, 01, 01, 0d, 00, 29, 01, 01, 0d, 00, 2a, 01, 01, 09, 00, 0a] Number of files: 1 - file 0 => $DIR/inner_items.rs Number of expressions: 0 -Number of file 0 mappings: 5 +Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 40, 9) to (start + 0, 44) - Code(Counter(0)) at (prev + 1, 13) to (start + 0, 41) -- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 20) -- Code(Counter(0)) at (prev + 0, 21) to (start + 0, 41) +- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 42) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10) Highest counter ID seen: c0 Function name: inner_items::main -Raw bytes (88): 0x[01, 01, 02, 01, 05, 01, 09, 10, 01, 03, 01, 00, 0a, 01, 04, 09, 00, 10, 01, 00, 13, 00, 2e, 01, 02, 09, 00, 16, 01, 00, 19, 00, 1a, 01, 01, 08, 00, 0f, 05, 00, 10, 02, 06, 02, 02, 05, 00, 06, 01, 24, 08, 00, 0f, 09, 00, 10, 02, 06, 06, 02, 05, 00, 06, 01, 02, 09, 00, 10, 01, 00, 13, 02, 06, 01, 04, 05, 00, 08, 01, 00, 09, 00, 1b, 01, 01, 01, 00, 02] +Raw bytes (68): 0x[01, 01, 02, 01, 05, 01, 09, 0c, 01, 03, 01, 00, 0a, 01, 04, 13, 00, 2e, 01, 02, 19, 00, 1a, 01, 01, 08, 00, 0f, 05, 01, 09, 00, 17, 02, 01, 05, 00, 06, 01, 24, 08, 00, 0f, 09, 01, 09, 00, 1b, 06, 01, 05, 00, 06, 01, 02, 13, 02, 06, 01, 04, 05, 00, 1d, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/inner_items.rs Number of expressions: 2 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) - expression 1 operands: lhs = Counter(0), rhs = Counter(2) -Number of file 0 mappings: 16 +Number of file 0 mappings: 12 - Code(Counter(0)) at (prev + 3, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 4, 9) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 19) to (start + 0, 46) -- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 22) -- Code(Counter(0)) at (prev + 0, 25) to (start + 0, 26) +- Code(Counter(0)) at (prev + 4, 19) to (start + 0, 46) +- Code(Counter(0)) at (prev + 2, 25) to (start + 0, 26) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 15) -- Code(Counter(1)) at (prev + 0, 16) to (start + 2, 6) -- Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 6) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 23) +- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 6) = (c0 - c1) - Code(Counter(0)) at (prev + 36, 8) to (start + 0, 15) -- Code(Counter(2)) at (prev + 0, 16) to (start + 2, 6) -- Code(Expression(1, Sub)) at (prev + 2, 5) to (start + 0, 6) +- Code(Counter(2)) at (prev + 1, 9) to (start + 0, 27) +- Code(Expression(1, Sub)) at (prev + 1, 5) to (start + 0, 6) = (c0 - c2) -- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 19) to (start + 2, 6) -- Code(Counter(0)) at (prev + 4, 5) to (start + 0, 8) -- Code(Counter(0)) at (prev + 0, 9) to (start + 0, 27) +- Code(Counter(0)) at (prev + 2, 19) to (start + 2, 6) +- Code(Counter(0)) at (prev + 4, 5) to (start + 0, 29) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c2 Function name: inner_items::main::in_func -Raw bytes (39): 0x[01, 01, 00, 07, 01, 12, 05, 00, 17, 01, 01, 0d, 00, 0e, 01, 00, 11, 00, 12, 01, 01, 0d, 00, 0e, 01, 00, 11, 00, 16, 01, 01, 09, 00, 11, 01, 01, 05, 00, 06] +Raw bytes (34): 0x[01, 01, 00, 06, 01, 12, 05, 00, 17, 01, 01, 11, 00, 12, 01, 01, 11, 00, 16, 01, 01, 09, 00, 11, 01, 00, 1c, 00, 1d, 01, 01, 05, 00, 06] Number of files: 1 - file 0 => $DIR/inner_items.rs Number of expressions: 0 -Number of file 0 mappings: 7 +Number of file 0 mappings: 6 - Code(Counter(0)) at (prev + 18, 5) to (start + 0, 23) -- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 18) -- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 22) +- Code(Counter(0)) at (prev + 1, 17) to (start + 0, 18) +- Code(Counter(0)) at (prev + 1, 17) to (start + 0, 22) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 17) +- Code(Counter(0)) at (prev + 0, 28) to (start + 0, 29) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 6) Highest counter ID seen: c0 diff --git a/tests/coverage/iffy/inner_items.coverage b/tests/coverage/iffy/inner_items.coverage index 8503cc12f233e..635ee05ddf5ab 100644 --- a/tests/coverage/iffy/inner_items.coverage +++ b/tests/coverage/iffy/inner_items.coverage @@ -9,8 +9,7 @@ LL| 1| let mut countdown = 0; LL| 1| if is_true { LL| 1| countdown = 10; - LL| 1| } - ^0 + LL| 0| } LL| | LL| | mod in_mod { LL| | const IN_MOD_CONST: u32 = 1000; @@ -48,8 +47,7 @@ LL| | LL| 1| if is_true { LL| 1| in_func(countdown); - LL| 1| } - ^0 + LL| 0| } LL| | LL| 1| let mut val = InStruct { LL| 1| in_struct_field: 101, // diff --git a/tests/coverage/iffy/issue-83601.cov-map b/tests/coverage/iffy/issue-83601.cov-map index 6d89397023c6f..e2bd5838c83ea 100644 --- a/tests/coverage/iffy/issue-83601.cov-map +++ b/tests/coverage/iffy/issue-83601.cov-map @@ -1,19 +1,24 @@ Function name: issue_83601::main -Raw bytes (59): 0x[01, 01, 00, 0b, 01, 06, 01, 00, 0a, 01, 01, 09, 00, 0c, 01, 00, 0f, 00, 15, 01, 01, 05, 00, 0f, 01, 01, 09, 00, 0c, 01, 00, 0f, 00, 15, 01, 01, 05, 00, 0f, 01, 01, 05, 00, 0d, 01, 01, 05, 00, 0d, 01, 01, 05, 00, 0d, 01, 01, 01, 00, 02] +Raw bytes (84): 0x[01, 01, 00, 10, 01, 06, 01, 00, 0a, 01, 01, 0f, 00, 15, 01, 01, 05, 00, 0f, 01, 00, 10, 00, 13, 01, 00, 15, 00, 1b, 01, 01, 0f, 00, 15, 01, 01, 05, 00, 0f, 01, 00, 10, 00, 13, 01, 00, 15, 00, 1b, 01, 01, 05, 00, 0d, 01, 00, 16, 00, 1c, 01, 01, 05, 00, 0d, 01, 00, 16, 00, 19, 01, 01, 05, 00, 0d, 01, 00, 16, 00, 19, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/issue-83601.rs Number of expressions: 0 -Number of file 0 mappings: 11 +Number of file 0 mappings: 16 - Code(Counter(0)) at (prev + 6, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 12) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 21) +- Code(Counter(0)) at (prev + 1, 15) to (start + 0, 21) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 12) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 21) +- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 19) +- Code(Counter(0)) at (prev + 0, 21) to (start + 0, 27) +- Code(Counter(0)) at (prev + 1, 15) to (start + 0, 21) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15) +- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 19) +- Code(Counter(0)) at (prev + 0, 21) to (start + 0, 27) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 22) to (start + 0, 28) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 22) to (start + 0, 25) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 22) to (start + 0, 25) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/iffy/issue-84561.cov-map b/tests/coverage/iffy/issue-84561.cov-map index ca009260cddc9..fa9a8acf71d34 100644 --- a/tests/coverage/iffy/issue-84561.cov-map +++ b/tests/coverage/iffy/issue-84561.cov-map @@ -1,13 +1,14 @@ Function name: ::fmt -Raw bytes (37): 0x[01, 01, 01, 01, 05, 06, 01, 8a, 01, 05, 00, 43, 01, 01, 09, 00, 0f, 01, 00, 10, 00, 11, 05, 00, 25, 00, 26, 02, 01, 09, 00, 0f, 01, 01, 05, 00, 06] +Raw bytes (42): 0x[01, 01, 01, 01, 05, 07, 01, 8a, 01, 05, 00, 43, 01, 01, 09, 00, 0f, 01, 00, 10, 00, 11, 01, 00, 13, 00, 24, 05, 00, 25, 00, 26, 02, 01, 09, 00, 0f, 01, 01, 05, 00, 06] Number of files: 1 - file 0 => $DIR/issue-84561.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 6 +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 138, 5) to (start + 0, 67) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 15) - Code(Counter(0)) at (prev + 0, 16) to (start + 0, 17) +- Code(Counter(0)) at (prev + 0, 19) to (start + 0, 36) - Code(Counter(1)) at (prev + 0, 37) to (start + 0, 38) - Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 15) = (c0 - c1) @@ -15,141 +16,194 @@ Number of file 0 mappings: 6 Highest counter ID seen: c1 Function name: issue_84561::main -Raw bytes (30): 0x[01, 01, 00, 05, 01, b4, 01, 01, 00, 0a, 01, 01, 05, 00, 0a, 01, 01, 05, 00, 0a, 01, 01, 05, 00, 0a, 01, 01, 01, 00, 02] +Raw bytes (30): 0x[01, 01, 00, 05, 01, b4, 01, 01, 00, 0a, 01, 01, 05, 00, 0c, 01, 01, 05, 00, 0c, 01, 01, 05, 00, 0c, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/issue-84561.rs Number of expressions: 0 Number of file 0 mappings: 5 - Code(Counter(0)) at (prev + 180, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 10) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 12) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 12) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 12) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: issue_84561::test1 -Raw bytes (45): 0x[01, 01, 00, 08, 01, 9a, 01, 01, 00, 0b, 01, 01, 05, 00, 0b, 01, 01, 05, 00, 0b, 01, 01, 0d, 00, 0e, 01, 01, 05, 00, 0b, 01, 01, 05, 02, 06, 01, 03, 05, 00, 0b, 01, 01, 01, 00, 02] +Raw bytes (65): 0x[01, 01, 00, 0c, 01, 9a, 01, 01, 00, 0b, 01, 01, 05, 00, 0b, 05, 00, 0c, 00, 1e, 01, 01, 05, 00, 0b, 09, 00, 0c, 00, 1e, 01, 01, 0d, 00, 0e, 01, 01, 05, 00, 0b, 0d, 00, 0c, 00, 1e, 01, 02, 09, 00, 23, 01, 02, 05, 00, 0b, 11, 00, 0c, 00, 1e, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/issue-84561.rs Number of expressions: 0 -Number of file 0 mappings: 8 +Number of file 0 mappings: 12 - Code(Counter(0)) at (prev + 154, 1) to (start + 0, 11) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 11) +- Code(Counter(1)) at (prev + 0, 12) to (start + 0, 30) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 11) +- Code(Counter(2)) at (prev + 0, 12) to (start + 0, 30) - Code(Counter(0)) at (prev + 1, 13) to (start + 0, 14) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 11) -- Code(Counter(0)) at (prev + 1, 5) to (start + 2, 6) -- Code(Counter(0)) at (prev + 3, 5) to (start + 0, 11) +- Code(Counter(3)) at (prev + 0, 12) to (start + 0, 30) +- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 35) +- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 11) +- Code(Counter(4)) at (prev + 0, 12) to (start + 0, 30) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) -Highest counter ID seen: c0 +Highest counter ID seen: c4 Function name: issue_84561::test2 -Raw bytes (20): 0x[01, 01, 00, 03, 01, b0, 01, 01, 00, 0b, 01, 01, 05, 00, 10, 01, 01, 01, 00, 02] +Raw bytes (25): 0x[01, 01, 00, 04, 01, b0, 01, 01, 00, 0b, 01, 01, 05, 00, 10, 05, 00, 11, 00, 23, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/issue-84561.rs Number of expressions: 0 -Number of file 0 mappings: 3 +Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 176, 1) to (start + 0, 11) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 16) +- Code(Counter(1)) at (prev + 0, 17) to (start + 0, 35) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) -Highest counter ID seen: c0 +Highest counter ID seen: c1 Function name: issue_84561::test2::call_print -Raw bytes (20): 0x[01, 01, 00, 03, 01, a7, 01, 09, 00, 1f, 01, 01, 0d, 00, 13, 01, 01, 09, 00, 0a] +Raw bytes (25): 0x[01, 01, 00, 04, 01, a7, 01, 09, 00, 1f, 01, 01, 0d, 00, 13, 01, 00, 1a, 00, 1b, 01, 01, 09, 00, 0a] Number of files: 1 - file 0 => $DIR/issue-84561.rs Number of expressions: 0 -Number of file 0 mappings: 3 +Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 167, 9) to (start + 0, 31) - Code(Counter(0)) at (prev + 1, 13) to (start + 0, 19) +- Code(Counter(0)) at (prev + 0, 26) to (start + 0, 27) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10) Highest counter ID seen: c0 Function name: issue_84561::test3 -Raw bytes (340): 0x[01, 01, 08, 01, 05, 01, 09, 01, 0d, 11, 15, 1d, 21, 19, 1d, 19, 1d, 19, 1d, 40, 01, 08, 01, 00, 0b, 01, 01, 09, 00, 10, 01, 00, 13, 00, 2e, 01, 01, 09, 00, 0c, 01, 00, 0f, 00, 15, 01, 01, 05, 00, 0f, 01, 01, 09, 00, 0c, 01, 00, 0f, 00, 15, 01, 01, 05, 00, 0f, 01, 01, 05, 00, 0d, 01, 01, 05, 00, 0d, 01, 01, 05, 00, 0d, 01, 02, 05, 00, 0f, 01, 01, 05, 00, 0f, 01, 01, 05, 00, 0f, 01, 01, 09, 00, 0c, 01, 00, 0f, 00, 15, 01, 01, 05, 00, 0f, 01, 01, 05, 00, 0f, 01, 01, 05, 00, 0f, 01, 01, 05, 00, 0d, 01, 01, 05, 00, 0d, 01, 02, 05, 00, 0f, 00, 00, 29, 00, 30, 00, 00, 33, 00, 41, 00, 00, 4b, 00, 5a, 01, 01, 05, 00, 0f, 00, 08, 09, 00, 10, 00, 02, 0d, 00, 1b, 00, 02, 0d, 00, 1c, 01, 04, 09, 00, 10, 01, 00, 13, 00, 2e, 01, 02, 05, 00, 0f, 01, 04, 05, 00, 0f, 01, 04, 05, 00, 0f, 01, 04, 09, 00, 0c, 01, 00, 0f, 00, 15, 01, 01, 05, 00, 0f, 01, 04, 08, 00, 0f, 05, 01, 09, 00, 13, 02, 05, 09, 00, 13, 01, 05, 08, 00, 0f, 09, 01, 09, 00, 13, 06, 06, 09, 00, 13, 01, 06, 05, 00, 0f, 01, 01, 0c, 00, 13, 0d, 01, 0d, 00, 13, 0a, 02, 0d, 00, 13, 11, 04, 05, 00, 0f, 11, 02, 0c, 00, 13, 15, 01, 0d, 00, 13, 0e, 02, 0d, 00, 13, 13, 03, 05, 00, 0f, 19, 01, 0c, 00, 13, 1d, 01, 0d, 00, 17, 1d, 04, 0d, 00, 13, 1e, 02, 0d, 00, 17, 1e, 01, 14, 00, 1b, 00, 01, 15, 00, 1b, 1e, 02, 15, 00, 1b, 21, 04, 0d, 00, 13, 25, 05, 05, 00, 0f, 00, 05, 05, 00, 0f, 00, 05, 01, 00, 02] +Raw bytes (541): 0x[01, 01, 0b, 01, 05, 01, 09, 01, 09, 01, 09, 01, 0d, 11, 15, 19, 1d, 19, 1d, 19, 1d, 19, 1d, 1d, 21, 67, 01, 08, 01, 00, 0b, 01, 01, 13, 00, 2e, 01, 01, 0f, 00, 15, 01, 01, 05, 00, 0f, 01, 00, 10, 00, 13, 01, 00, 15, 00, 1b, 01, 01, 0f, 00, 15, 01, 01, 05, 00, 0f, 01, 00, 10, 00, 13, 01, 00, 15, 00, 1b, 01, 01, 05, 00, 0d, 01, 00, 16, 00, 1c, 01, 01, 05, 00, 0d, 01, 00, 16, 00, 19, 01, 01, 05, 00, 0d, 01, 00, 16, 00, 19, 01, 02, 05, 00, 0f, 01, 00, 10, 00, 16, 01, 00, 18, 00, 1e, 01, 01, 05, 00, 0f, 01, 00, 10, 00, 16, 01, 00, 18, 00, 1e, 01, 01, 05, 00, 0f, 01, 00, 10, 00, 16, 01, 00, 18, 00, 1e, 01, 01, 0f, 00, 15, 01, 01, 05, 00, 0f, 01, 00, 10, 00, 13, 01, 00, 15, 00, 1b, 01, 01, 05, 00, 0f, 01, 00, 10, 00, 16, 01, 00, 18, 00, 1e, 01, 01, 05, 00, 0f, 01, 00, 10, 00, 16, 01, 00, 18, 00, 1e, 01, 01, 05, 00, 0d, 01, 00, 16, 00, 19, 01, 01, 05, 00, 0d, 01, 00, 16, 00, 1c, 01, 02, 05, 00, 0f, 01, 00, 10, 00, 16, 01, 00, 18, 00, 1e, 01, 01, 05, 00, 0f, 01, 01, 09, 00, 0f, 01, 02, 09, 00, 0f, 01, 0d, 13, 00, 2e, 01, 02, 05, 00, 0f, 01, 01, 09, 00, 0f, 01, 01, 09, 00, 0f, 01, 02, 05, 00, 0f, 01, 01, 09, 00, 0f, 01, 01, 09, 00, 0f, 01, 02, 05, 00, 0f, 01, 01, 09, 00, 0f, 01, 01, 09, 00, 0f, 01, 02, 0f, 00, 15, 01, 01, 05, 00, 0f, 01, 01, 09, 00, 0c, 01, 01, 09, 00, 0f, 01, 02, 08, 00, 0f, 05, 01, 09, 00, 13, 05, 01, 0d, 00, 13, 05, 01, 0d, 00, 13, 02, 03, 09, 00, 13, 02, 01, 0d, 00, 13, 02, 01, 0d, 00, 13, 01, 03, 08, 00, 0f, 09, 01, 09, 00, 13, 09, 01, 0d, 00, 13, 09, 01, 0d, 00, 13, 0e, 04, 09, 00, 13, 0e, 01, 0d, 00, 13, 0e, 01, 0d, 00, 13, 01, 04, 05, 00, 0f, 01, 01, 0c, 00, 13, 0d, 01, 0d, 00, 13, 12, 02, 0d, 00, 13, 01, 02, 09, 00, 0f, 11, 02, 05, 00, 0f, 11, 01, 09, 00, 0f, 11, 01, 0c, 00, 13, 15, 01, 0d, 00, 13, 16, 02, 0d, 00, 13, 19, 03, 05, 00, 0f, 19, 01, 0c, 00, 13, 1d, 01, 0d, 00, 17, 1d, 01, 11, 00, 17, 1d, 01, 11, 00, 17, 1d, 02, 0d, 00, 13, 26, 02, 0d, 00, 17, 26, 01, 14, 00, 1b, 00, 01, 15, 00, 1b, 26, 02, 15, 00, 1b, 26, 02, 11, 00, 17, 21, 02, 0d, 00, 13, 2b, 02, 09, 00, 0f, 25, 03, 05, 00, 0f, 25, 01, 09, 00, 0f, 25, 01, 09, 00, 0f, 00, 03, 05, 00, 0f, 00, 01, 09, 00, 0f, 00, 01, 09, 00, 0f, 00, 03, 01, 00, 02] Number of files: 1 - file 0 => $DIR/issue-84561.rs -Number of expressions: 8 +Number of expressions: 11 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) - expression 1 operands: lhs = Counter(0), rhs = Counter(2) -- expression 2 operands: lhs = Counter(0), rhs = Counter(3) -- expression 3 operands: lhs = Counter(4), rhs = Counter(5) -- expression 4 operands: lhs = Counter(7), rhs = Counter(8) -- expression 5 operands: lhs = Counter(6), rhs = Counter(7) +- expression 2 operands: lhs = Counter(0), rhs = Counter(2) +- expression 3 operands: lhs = Counter(0), rhs = Counter(2) +- expression 4 operands: lhs = Counter(0), rhs = Counter(3) +- expression 5 operands: lhs = Counter(4), rhs = Counter(5) - expression 6 operands: lhs = Counter(6), rhs = Counter(7) - expression 7 operands: lhs = Counter(6), rhs = Counter(7) -Number of file 0 mappings: 64 +- expression 8 operands: lhs = Counter(6), rhs = Counter(7) +- expression 9 operands: lhs = Counter(6), rhs = Counter(7) +- expression 10 operands: lhs = Counter(7), rhs = Counter(8) +Number of file 0 mappings: 103 - Code(Counter(0)) at (prev + 8, 1) to (start + 0, 11) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 19) to (start + 0, 46) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 12) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 21) +- Code(Counter(0)) at (prev + 1, 19) to (start + 0, 46) +- Code(Counter(0)) at (prev + 1, 15) to (start + 0, 21) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 12) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 21) +- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 19) +- Code(Counter(0)) at (prev + 0, 21) to (start + 0, 27) +- Code(Counter(0)) at (prev + 1, 15) to (start + 0, 21) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15) +- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 19) +- Code(Counter(0)) at (prev + 0, 21) to (start + 0, 27) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 22) to (start + 0, 28) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 22) to (start + 0, 25) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 22) to (start + 0, 25) - Code(Counter(0)) at (prev + 2, 5) to (start + 0, 15) +- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 22) +- Code(Counter(0)) at (prev + 0, 24) to (start + 0, 30) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15) +- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 22) +- Code(Counter(0)) at (prev + 0, 24) to (start + 0, 30) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 12) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 21) +- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 22) +- Code(Counter(0)) at (prev + 0, 24) to (start + 0, 30) +- Code(Counter(0)) at (prev + 1, 15) to (start + 0, 21) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15) +- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 19) +- Code(Counter(0)) at (prev + 0, 21) to (start + 0, 27) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15) +- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 22) +- Code(Counter(0)) at (prev + 0, 24) to (start + 0, 30) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15) +- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 22) +- Code(Counter(0)) at (prev + 0, 24) to (start + 0, 30) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 22) to (start + 0, 25) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 22) to (start + 0, 28) - Code(Counter(0)) at (prev + 2, 5) to (start + 0, 15) -- Code(Zero) at (prev + 0, 41) to (start + 0, 48) -- Code(Zero) at (prev + 0, 51) to (start + 0, 65) -- Code(Zero) at (prev + 0, 75) to (start + 0, 90) +- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 22) +- Code(Counter(0)) at (prev + 0, 24) to (start + 0, 30) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15) -- Code(Zero) at (prev + 8, 9) to (start + 0, 16) -- Code(Zero) at (prev + 2, 13) to (start + 0, 27) -- Code(Zero) at (prev + 2, 13) to (start + 0, 28) -- Code(Counter(0)) at (prev + 4, 9) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 19) to (start + 0, 46) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 15) +- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 15) +- Code(Counter(0)) at (prev + 13, 19) to (start + 0, 46) - Code(Counter(0)) at (prev + 2, 5) to (start + 0, 15) -- Code(Counter(0)) at (prev + 4, 5) to (start + 0, 15) -- Code(Counter(0)) at (prev + 4, 5) to (start + 0, 15) -- Code(Counter(0)) at (prev + 4, 9) to (start + 0, 12) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 21) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 15) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 15) +- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 15) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 15) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 15) +- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 15) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 15) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 15) +- Code(Counter(0)) at (prev + 2, 15) to (start + 0, 21) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15) -- Code(Counter(0)) at (prev + 4, 8) to (start + 0, 15) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 12) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 15) +- Code(Counter(0)) at (prev + 2, 8) to (start + 0, 15) - Code(Counter(1)) at (prev + 1, 9) to (start + 0, 19) -- Code(Expression(0, Sub)) at (prev + 5, 9) to (start + 0, 19) +- Code(Counter(1)) at (prev + 1, 13) to (start + 0, 19) +- Code(Counter(1)) at (prev + 1, 13) to (start + 0, 19) +- Code(Expression(0, Sub)) at (prev + 3, 9) to (start + 0, 19) + = (c0 - c1) +- Code(Expression(0, Sub)) at (prev + 1, 13) to (start + 0, 19) + = (c0 - c1) +- Code(Expression(0, Sub)) at (prev + 1, 13) to (start + 0, 19) = (c0 - c1) -- Code(Counter(0)) at (prev + 5, 8) to (start + 0, 15) +- Code(Counter(0)) at (prev + 3, 8) to (start + 0, 15) - Code(Counter(2)) at (prev + 1, 9) to (start + 0, 19) -- Code(Expression(1, Sub)) at (prev + 6, 9) to (start + 0, 19) +- Code(Counter(2)) at (prev + 1, 13) to (start + 0, 19) +- Code(Counter(2)) at (prev + 1, 13) to (start + 0, 19) +- Code(Expression(3, Sub)) at (prev + 4, 9) to (start + 0, 19) = (c0 - c2) -- Code(Counter(0)) at (prev + 6, 5) to (start + 0, 15) +- Code(Expression(3, Sub)) at (prev + 1, 13) to (start + 0, 19) + = (c0 - c2) +- Code(Expression(3, Sub)) at (prev + 1, 13) to (start + 0, 19) + = (c0 - c2) +- Code(Counter(0)) at (prev + 4, 5) to (start + 0, 15) - Code(Counter(0)) at (prev + 1, 12) to (start + 0, 19) - Code(Counter(3)) at (prev + 1, 13) to (start + 0, 19) -- Code(Expression(2, Sub)) at (prev + 2, 13) to (start + 0, 19) +- Code(Expression(4, Sub)) at (prev + 2, 13) to (start + 0, 19) = (c0 - c3) -- Code(Counter(4)) at (prev + 4, 5) to (start + 0, 15) -- Code(Counter(4)) at (prev + 2, 12) to (start + 0, 19) +- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 15) +- Code(Counter(4)) at (prev + 2, 5) to (start + 0, 15) +- Code(Counter(4)) at (prev + 1, 9) to (start + 0, 15) +- Code(Counter(4)) at (prev + 1, 12) to (start + 0, 19) - Code(Counter(5)) at (prev + 1, 13) to (start + 0, 19) -- Code(Expression(3, Sub)) at (prev + 2, 13) to (start + 0, 19) +- Code(Expression(5, Sub)) at (prev + 2, 13) to (start + 0, 19) = (c4 - c5) -- Code(Expression(4, Add)) at (prev + 3, 5) to (start + 0, 15) - = (c7 + c8) +- Code(Counter(6)) at (prev + 3, 5) to (start + 0, 15) - Code(Counter(6)) at (prev + 1, 12) to (start + 0, 19) - Code(Counter(7)) at (prev + 1, 13) to (start + 0, 23) -- Code(Counter(7)) at (prev + 4, 13) to (start + 0, 19) -- Code(Expression(7, Sub)) at (prev + 2, 13) to (start + 0, 23) +- Code(Counter(7)) at (prev + 1, 17) to (start + 0, 23) +- Code(Counter(7)) at (prev + 1, 17) to (start + 0, 23) +- Code(Counter(7)) at (prev + 2, 13) to (start + 0, 19) +- Code(Expression(9, Sub)) at (prev + 2, 13) to (start + 0, 23) = (c6 - c7) -- Code(Expression(7, Sub)) at (prev + 1, 20) to (start + 0, 27) +- Code(Expression(9, Sub)) at (prev + 1, 20) to (start + 0, 27) = (c6 - c7) - Code(Zero) at (prev + 1, 21) to (start + 0, 27) -- Code(Expression(7, Sub)) at (prev + 2, 21) to (start + 0, 27) +- Code(Expression(9, Sub)) at (prev + 2, 21) to (start + 0, 27) + = (c6 - c7) +- Code(Expression(9, Sub)) at (prev + 2, 17) to (start + 0, 23) = (c6 - c7) -- Code(Counter(8)) at (prev + 4, 13) to (start + 0, 19) -- Code(Counter(9)) at (prev + 5, 5) to (start + 0, 15) -- Code(Zero) at (prev + 5, 5) to (start + 0, 15) -- Code(Zero) at (prev + 5, 1) to (start + 0, 2) +- Code(Counter(8)) at (prev + 2, 13) to (start + 0, 19) +- Code(Expression(10, Add)) at (prev + 2, 9) to (start + 0, 15) + = (c7 + c8) +- Code(Counter(9)) at (prev + 3, 5) to (start + 0, 15) +- Code(Counter(9)) at (prev + 1, 9) to (start + 0, 15) +- Code(Counter(9)) at (prev + 1, 9) to (start + 0, 15) +- Code(Zero) at (prev + 3, 5) to (start + 0, 15) +- Code(Zero) at (prev + 1, 9) to (start + 0, 15) +- Code(Zero) at (prev + 1, 9) to (start + 0, 15) +- Code(Zero) at (prev + 3, 1) to (start + 0, 2) Highest counter ID seen: c9 diff --git a/tests/coverage/iffy/issue-84561.coverage b/tests/coverage/iffy/issue-84561.coverage index 8a8396e95d2b5..aa79dffb7ef97 100644 --- a/tests/coverage/iffy/issue-84561.coverage +++ b/tests/coverage/iffy/issue-84561.coverage @@ -26,63 +26,62 @@ LL| 1| println!("{:?}", Foo(1)); LL| | LL| 1| assert_ne!(Foo(0), Foo(5), "{}", if is_true { "true message" } else { "false message" }); - ^0 ^0 ^0 LL| 1| assert_ne!( - LL| | Foo(0) + LL| 1| Foo(0) LL| | , - LL| | Foo(5) + LL| 1| Foo(5) LL| | , LL| | "{}" LL| | , LL| | if - LL| 0| is_true + LL| | is_true LL| | { - LL| 0| "true message" + LL| | "true message" LL| | } else { - LL| 0| "false message" + LL| | "false message" LL| | } LL| | ); LL| | LL| 1| let is_true = std::env::args().len() == 1; LL| | LL| 1| assert_eq!( - LL| | Foo(1), - LL| | Foo(1) + LL| 1| Foo(1), + LL| 1| Foo(1) LL| | ); LL| 1| assert_ne!( - LL| | Foo(0), - LL| | Foo(1) + LL| 1| Foo(0), + LL| 1| Foo(1) LL| | ); LL| 1| assert_eq!( - LL| | Foo(2), - LL| | Foo(2) + LL| 1| Foo(2), + LL| 1| Foo(2) LL| | ); LL| 1| let bar = Foo(1); LL| 1| assert_ne!( - LL| | bar, - LL| | Foo(3) + LL| 1| bar, + LL| 1| Foo(3) LL| | ); LL| 1| if is_true { LL| 1| assert_ne!( - LL| | Foo(0), - LL| | Foo(4) + LL| 1| Foo(0), + LL| 1| Foo(4) LL| | ); LL| | } else { LL| 0| assert_eq!( - LL| | Foo(3), - LL| | Foo(3) + LL| 0| Foo(3), + LL| 0| Foo(3) LL| | ); LL| | } LL| 1| if is_true { LL| 1| assert_ne!( - LL| | Foo(0), - LL| | Foo(4), + LL| 1| Foo(0), + LL| 1| Foo(4), LL| | "with a message" LL| | ); LL| | } else { LL| 0| assert_eq!( - LL| | Foo(3), - LL| | Foo(3), + LL| 0| Foo(3), + LL| 0| Foo(3), LL| | "with a message" LL| | ); LL| | } @@ -92,10 +91,10 @@ LL| | } else { LL| 0| Foo(1) LL| | }, - LL| | Foo(5) + LL| 1| Foo(5) LL| | ); LL| 1| assert_ne!( - LL| | Foo(5), + LL| 1| Foo(5), LL| 1| if is_true { LL| 1| Foo(0) LL| | } else { @@ -105,8 +104,8 @@ LL| 1| assert_ne!( LL| 1| if is_true { LL| 1| assert_eq!( - LL| | Foo(3), - LL| | Foo(3) + LL| 1| Foo(3), + LL| 1| Foo(3) LL| | ); LL| 1| Foo(0) LL| | } else { @@ -116,21 +115,21 @@ LL| | } else { LL| 0| Foo(1) LL| | }, - LL| | Foo(5) + LL| 0| Foo(5) LL| | ); LL| 0| Foo(1) LL| | }, - LL| | Foo(5), + LL| 1| Foo(5), LL| | "with a message" LL| | ); LL| 1| assert_eq!( - LL| | Foo(1), - LL| | Foo(3), + LL| 1| Foo(1), + LL| 1| Foo(3), LL| | "this assert should fail" LL| | ); LL| 0| assert_eq!( - LL| | Foo(3), - LL| | Foo(3), + LL| 0| Foo(3), + LL| 0| Foo(3), LL| | "this assert should not be reached" LL| | ); LL| 0|} @@ -155,12 +154,15 @@ LL| | LL| 1|fn test1() { LL| 1| debug!("debug is enabled"); + ^0 LL| 1| debug!("debug is enabled"); + ^0 LL| 1| let _ = 0; LL| 1| debug!("debug is enabled"); - LL| 1| unsafe { + ^0 + LL| | unsafe { LL| 1| DEBUG_LEVEL_ENABLED = true; - LL| 1| } + LL| | } LL| 1| debug!("debug is enabled"); LL| 1|} LL| | diff --git a/tests/coverage/iffy/issue-85461.cov-map b/tests/coverage/iffy/issue-85461.cov-map index b08d70336930c..aac4bf0ea4812 100644 --- a/tests/coverage/iffy/issue-85461.cov-map +++ b/tests/coverage/iffy/issue-85461.cov-map @@ -1,12 +1,12 @@ Function name: issue_85461::main -Raw bytes (24): 0x[01, 01, 00, 04, 01, 08, 01, 00, 0a, 01, 01, 05, 00, 11, 01, 01, 05, 00, 11, 01, 01, 01, 00, 02] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 08, 01, 00, 0a, 01, 01, 05, 00, 13, 01, 01, 05, 00, 13, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/issue-85461.rs Number of expressions: 0 Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 8, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 17) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 17) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 19) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 19) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/iffy/lazy_boolean.cov-map b/tests/coverage/iffy/lazy_boolean.cov-map index cbbe6a89fb0fa..f838d77143d81 100644 --- a/tests/coverage/iffy/lazy_boolean.cov-map +++ b/tests/coverage/iffy/lazy_boolean.cov-map @@ -1,5 +1,5 @@ Function name: lazy_boolean::main -Raw bytes (198): 0x[01, 01, 07, 01, 05, 01, 25, 01, 21, 01, 11, 01, 15, 01, 19, 01, 1d, 24, 01, 04, 01, 00, 0a, 01, 04, 09, 00, 10, 01, 00, 13, 00, 2e, 01, 02, 0a, 00, 0f, 01, 00, 11, 00, 16, 01, 00, 18, 00, 1d, 01, 00, 21, 00, 2a, 01, 01, 08, 00, 0f, 05, 00, 10, 04, 06, 05, 01, 09, 00, 0e, 02, 03, 05, 00, 06, 01, 02, 09, 00, 11, 01, 02, 0d, 00, 12, 06, 02, 0d, 00, 12, 01, 03, 09, 00, 11, 01, 02, 0d, 00, 12, 0a, 02, 0d, 00, 12, 01, 02, 09, 00, 11, 01, 00, 14, 00, 19, 09, 00, 1d, 00, 22, 01, 01, 09, 00, 11, 01, 00, 14, 00, 19, 0d, 00, 1d, 00, 22, 01, 03, 09, 01, 10, 0e, 02, 05, 03, 06, 11, 03, 05, 00, 06, 01, 03, 09, 00, 10, 15, 01, 05, 03, 06, 12, 05, 05, 03, 06, 01, 05, 08, 00, 10, 16, 00, 11, 02, 06, 19, 02, 05, 00, 06, 01, 02, 08, 00, 0f, 1d, 00, 10, 02, 06, 1a, 02, 0c, 02, 06, 01, 03, 01, 00, 02] +Raw bytes (168): 0x[01, 01, 07, 01, 05, 01, 25, 01, 21, 01, 11, 01, 15, 01, 19, 01, 1d, 1e, 01, 04, 01, 00, 0a, 01, 04, 13, 00, 2e, 01, 02, 21, 00, 2a, 01, 00, 22, 00, 23, 01, 01, 08, 00, 0f, 05, 01, 09, 00, 0e, 05, 01, 09, 00, 0f, 05, 01, 09, 00, 10, 02, 01, 05, 00, 06, 01, 04, 0d, 00, 12, 06, 02, 0d, 00, 12, 01, 05, 0d, 00, 12, 0a, 02, 0d, 00, 12, 01, 02, 14, 00, 19, 09, 00, 1d, 00, 22, 01, 01, 14, 00, 19, 0d, 00, 1d, 00, 22, 01, 03, 09, 01, 10, 0e, 03, 09, 00, 0e, 11, 02, 05, 00, 06, 01, 03, 09, 00, 10, 15, 02, 09, 00, 0f, 12, 05, 09, 00, 10, 01, 04, 08, 00, 10, 16, 01, 09, 00, 0e, 19, 01, 05, 00, 06, 01, 02, 08, 00, 0f, 1d, 01, 09, 00, 0f, 1a, 02, 09, 00, 10, 01, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/lazy_boolean.rs Number of expressions: 7 @@ -10,49 +10,43 @@ Number of expressions: 7 - expression 4 operands: lhs = Counter(0), rhs = Counter(5) - expression 5 operands: lhs = Counter(0), rhs = Counter(6) - expression 6 operands: lhs = Counter(0), rhs = Counter(7) -Number of file 0 mappings: 36 +Number of file 0 mappings: 30 - Code(Counter(0)) at (prev + 4, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 4, 9) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 19) to (start + 0, 46) -- Code(Counter(0)) at (prev + 2, 10) to (start + 0, 15) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 22) -- Code(Counter(0)) at (prev + 0, 24) to (start + 0, 29) -- Code(Counter(0)) at (prev + 0, 33) to (start + 0, 42) +- Code(Counter(0)) at (prev + 4, 19) to (start + 0, 46) +- Code(Counter(0)) at (prev + 2, 33) to (start + 0, 42) +- Code(Counter(0)) at (prev + 0, 34) to (start + 0, 35) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 15) -- Code(Counter(1)) at (prev + 0, 16) to (start + 4, 6) - Code(Counter(1)) at (prev + 1, 9) to (start + 0, 14) -- Code(Expression(0, Sub)) at (prev + 3, 5) to (start + 0, 6) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 15) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 16) +- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 6) = (c0 - c1) -- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 17) -- Code(Counter(0)) at (prev + 2, 13) to (start + 0, 18) +- Code(Counter(0)) at (prev + 4, 13) to (start + 0, 18) - Code(Expression(1, Sub)) at (prev + 2, 13) to (start + 0, 18) = (c0 - c9) -- Code(Counter(0)) at (prev + 3, 9) to (start + 0, 17) -- Code(Counter(0)) at (prev + 2, 13) to (start + 0, 18) +- Code(Counter(0)) at (prev + 5, 13) to (start + 0, 18) - Code(Expression(2, Sub)) at (prev + 2, 13) to (start + 0, 18) = (c0 - c8) -- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 17) -- Code(Counter(0)) at (prev + 0, 20) to (start + 0, 25) +- Code(Counter(0)) at (prev + 2, 20) to (start + 0, 25) - Code(Counter(2)) at (prev + 0, 29) to (start + 0, 34) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 17) -- Code(Counter(0)) at (prev + 0, 20) to (start + 0, 25) +- Code(Counter(0)) at (prev + 1, 20) to (start + 0, 25) - Code(Counter(3)) at (prev + 0, 29) to (start + 0, 34) - Code(Counter(0)) at (prev + 3, 9) to (start + 1, 16) -- Code(Expression(3, Sub)) at (prev + 2, 5) to (start + 3, 6) +- Code(Expression(3, Sub)) at (prev + 3, 9) to (start + 0, 14) = (c0 - c4) -- Code(Counter(4)) at (prev + 3, 5) to (start + 0, 6) +- Code(Counter(4)) at (prev + 2, 5) to (start + 0, 6) - Code(Counter(0)) at (prev + 3, 9) to (start + 0, 16) -- Code(Counter(5)) at (prev + 1, 5) to (start + 3, 6) -- Code(Expression(4, Sub)) at (prev + 5, 5) to (start + 3, 6) +- Code(Counter(5)) at (prev + 2, 9) to (start + 0, 15) +- Code(Expression(4, Sub)) at (prev + 5, 9) to (start + 0, 16) = (c0 - c5) -- Code(Counter(0)) at (prev + 5, 8) to (start + 0, 16) -- Code(Expression(5, Sub)) at (prev + 0, 17) to (start + 2, 6) +- Code(Counter(0)) at (prev + 4, 8) to (start + 0, 16) +- Code(Expression(5, Sub)) at (prev + 1, 9) to (start + 0, 14) = (c0 - c6) -- Code(Counter(6)) at (prev + 2, 5) to (start + 0, 6) +- Code(Counter(6)) at (prev + 1, 5) to (start + 0, 6) - Code(Counter(0)) at (prev + 2, 8) to (start + 0, 15) -- Code(Counter(7)) at (prev + 0, 16) to (start + 2, 6) -- Code(Expression(6, Sub)) at (prev + 2, 12) to (start + 2, 6) +- Code(Counter(7)) at (prev + 1, 9) to (start + 0, 15) +- Code(Expression(6, Sub)) at (prev + 2, 9) to (start + 0, 16) = (c0 - c7) -- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2) +- Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2) Highest counter ID seen: c7 diff --git a/tests/coverage/iffy/lazy_boolean.coverage b/tests/coverage/iffy/lazy_boolean.coverage index 0a30038e02fa2..a3060dc0da7a7 100644 --- a/tests/coverage/iffy/lazy_boolean.coverage +++ b/tests/coverage/iffy/lazy_boolean.coverage @@ -12,17 +12,16 @@ LL| 1| a = 1; LL| 1| b = 10; LL| 1| c = 100; - LL| 1| } - ^0 + LL| 0| } LL| | let - LL| 1| somebool + LL| | somebool LL| | = LL| 1| a < b LL| | || LL| 0| b < c LL| | ; LL| | let - LL| 1| somebool + LL| | somebool LL| | = LL| 1| b < a LL| | || @@ -35,22 +34,22 @@ LL| | if LL| 1| ! LL| 1| is_true - LL| 0| { + LL| | { LL| 0| a = 2 - LL| 0| ; + LL| | ; LL| 1| } LL| | LL| | if LL| 1| is_true - LL| 1| { + LL| | { LL| 1| b = 30 - LL| 1| ; - LL| 1| } + LL| | ; + LL| | } LL| | else - LL| 0| { + LL| | { LL| 0| c = 400 - LL| 0| ; - LL| 0| } + LL| | ; + LL| | } LL| | LL| 1| if !is_true { LL| 0| a = 2; @@ -58,8 +57,8 @@ LL| | LL| 1| if is_true { LL| 1| b = 30; - LL| 1| } else { + LL| | } else { LL| 0| c = 400; - LL| 0| } + LL| | } LL| 1|} diff --git a/tests/coverage/iffy/loops_branches.cov-map b/tests/coverage/iffy/loops_branches.cov-map index 8d6cc0a470c00..603600946d776 100644 --- a/tests/coverage/iffy/loops_branches.cov-map +++ b/tests/coverage/iffy/loops_branches.cov-map @@ -1,5 +1,5 @@ Function name: ::fmt -Raw bytes (129): 0x[01, 01, 05, 01, 05, 0b, 0f, 01, 09, 05, 0d, 0d, 09, 17, 01, 09, 05, 00, 43, 01, 01, 0c, 00, 10, 01, 01, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 01, 01, 0d, 00, 0e, 01, 01, 0d, 00, 13, 01, 00, 14, 00, 15, 05, 00, 1e, 00, 1f, 00, 01, 10, 01, 0a, 09, 03, 0d, 00, 0e, 02, 00, 12, 00, 17, 09, 01, 10, 00, 14, 09, 01, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, 09, 01, 11, 00, 12, 09, 01, 11, 00, 17, 09, 00, 18, 00, 19, 06, 00, 22, 00, 23, 00, 01, 14, 01, 0e, 12, 03, 09, 00, 0f, 01, 01, 05, 00, 06] +Raw bytes (134): 0x[01, 01, 05, 01, 05, 0b, 0f, 01, 09, 05, 0d, 0d, 09, 18, 01, 09, 05, 00, 43, 01, 01, 0c, 00, 10, 01, 01, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 01, 01, 0d, 00, 0e, 01, 01, 0d, 00, 13, 01, 00, 14, 00, 15, 01, 00, 17, 00, 1d, 05, 00, 1e, 00, 1f, 00, 01, 10, 01, 0a, 02, 03, 12, 00, 17, 09, 01, 10, 00, 14, 09, 01, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, 09, 01, 11, 00, 12, 09, 01, 11, 00, 17, 09, 00, 18, 00, 19, 09, 00, 1b, 00, 21, 06, 00, 22, 00, 23, 00, 01, 14, 01, 0e, 12, 03, 09, 00, 0f, 01, 01, 05, 00, 06] Number of files: 1 - file 0 => $DIR/loops_branches.rs Number of expressions: 5 @@ -8,7 +8,7 @@ Number of expressions: 5 - expression 2 operands: lhs = Counter(0), rhs = Counter(2) - expression 3 operands: lhs = Counter(1), rhs = Counter(3) - expression 4 operands: lhs = Counter(3), rhs = Counter(2) -Number of file 0 mappings: 23 +Number of file 0 mappings: 24 - Code(Counter(0)) at (prev + 9, 5) to (start + 0, 67) - Code(Counter(0)) at (prev + 1, 12) to (start + 0, 16) - Code(Counter(0)) at (prev + 1, 16) to (start + 0, 21) @@ -17,10 +17,10 @@ Number of file 0 mappings: 23 - Code(Counter(0)) at (prev + 1, 13) to (start + 0, 14) - Code(Counter(0)) at (prev + 1, 13) to (start + 0, 19) - Code(Counter(0)) at (prev + 0, 20) to (start + 0, 21) +- Code(Counter(0)) at (prev + 0, 23) to (start + 0, 29) - Code(Counter(1)) at (prev + 0, 30) to (start + 0, 31) - Code(Zero) at (prev + 1, 16) to (start + 1, 10) -- Code(Counter(2)) at (prev + 3, 13) to (start + 0, 14) -- Code(Expression(0, Sub)) at (prev + 0, 18) to (start + 0, 23) +- Code(Expression(0, Sub)) at (prev + 3, 18) to (start + 0, 23) = (c0 - c1) - Code(Counter(2)) at (prev + 1, 16) to (start + 0, 20) - Code(Counter(2)) at (prev + 1, 20) to (start + 0, 25) @@ -29,6 +29,7 @@ Number of file 0 mappings: 23 - Code(Counter(2)) at (prev + 1, 17) to (start + 0, 18) - Code(Counter(2)) at (prev + 1, 17) to (start + 0, 23) - Code(Counter(2)) at (prev + 0, 24) to (start + 0, 25) +- Code(Counter(2)) at (prev + 0, 27) to (start + 0, 33) - Code(Expression(1, Sub)) at (prev + 0, 34) to (start + 0, 35) = ((c0 + c2) - (c1 + c3)) - Code(Zero) at (prev + 1, 20) to (start + 1, 14) @@ -38,7 +39,7 @@ Number of file 0 mappings: 23 Highest counter ID seen: c2 Function name: ::fmt -Raw bytes (129): 0x[01, 01, 05, 01, 05, 0b, 0f, 01, 09, 0d, 05, 0d, 09, 17, 01, 22, 05, 00, 43, 01, 01, 0c, 00, 11, 00, 00, 12, 01, 0a, 01, 02, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 01, 01, 0d, 00, 0e, 01, 01, 0d, 00, 13, 01, 00, 14, 00, 15, 05, 00, 1e, 00, 1f, 09, 02, 0d, 00, 0e, 02, 00, 12, 00, 17, 09, 01, 10, 00, 15, 00, 00, 16, 01, 0e, 09, 02, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, 09, 01, 11, 00, 12, 09, 01, 11, 00, 17, 09, 00, 18, 00, 19, 06, 00, 22, 00, 23, 12, 03, 09, 00, 0f, 01, 01, 05, 00, 06] +Raw bytes (134): 0x[01, 01, 05, 01, 05, 0b, 0f, 01, 09, 0d, 05, 0d, 09, 18, 01, 22, 05, 00, 43, 01, 01, 0c, 00, 11, 00, 00, 12, 01, 0a, 01, 02, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 01, 01, 0d, 00, 0e, 01, 01, 0d, 00, 13, 01, 00, 14, 00, 15, 01, 00, 17, 00, 1d, 05, 00, 1e, 00, 1f, 02, 02, 12, 00, 17, 09, 01, 10, 00, 15, 00, 00, 16, 01, 0e, 09, 02, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, 09, 01, 11, 00, 12, 09, 01, 11, 00, 17, 09, 00, 18, 00, 19, 09, 00, 1b, 00, 21, 06, 00, 22, 00, 23, 12, 03, 09, 00, 0f, 01, 01, 05, 00, 06] Number of files: 1 - file 0 => $DIR/loops_branches.rs Number of expressions: 5 @@ -47,7 +48,7 @@ Number of expressions: 5 - expression 2 operands: lhs = Counter(0), rhs = Counter(2) - expression 3 operands: lhs = Counter(3), rhs = Counter(1) - expression 4 operands: lhs = Counter(3), rhs = Counter(2) -Number of file 0 mappings: 23 +Number of file 0 mappings: 24 - Code(Counter(0)) at (prev + 34, 5) to (start + 0, 67) - Code(Counter(0)) at (prev + 1, 12) to (start + 0, 17) - Code(Zero) at (prev + 0, 18) to (start + 1, 10) @@ -57,9 +58,9 @@ Number of file 0 mappings: 23 - Code(Counter(0)) at (prev + 1, 13) to (start + 0, 14) - Code(Counter(0)) at (prev + 1, 13) to (start + 0, 19) - Code(Counter(0)) at (prev + 0, 20) to (start + 0, 21) +- Code(Counter(0)) at (prev + 0, 23) to (start + 0, 29) - Code(Counter(1)) at (prev + 0, 30) to (start + 0, 31) -- Code(Counter(2)) at (prev + 2, 13) to (start + 0, 14) -- Code(Expression(0, Sub)) at (prev + 0, 18) to (start + 0, 23) +- Code(Expression(0, Sub)) at (prev + 2, 18) to (start + 0, 23) = (c0 - c1) - Code(Counter(2)) at (prev + 1, 16) to (start + 0, 21) - Code(Zero) at (prev + 0, 22) to (start + 1, 14) @@ -69,6 +70,7 @@ Number of file 0 mappings: 23 - Code(Counter(2)) at (prev + 1, 17) to (start + 0, 18) - Code(Counter(2)) at (prev + 1, 17) to (start + 0, 23) - Code(Counter(2)) at (prev + 0, 24) to (start + 0, 25) +- Code(Counter(2)) at (prev + 0, 27) to (start + 0, 33) - Code(Expression(1, Sub)) at (prev + 0, 34) to (start + 0, 35) = ((c0 + c2) - (c3 + c1)) - Code(Expression(4, Sub)) at (prev + 3, 9) to (start + 0, 15) @@ -77,18 +79,18 @@ Number of file 0 mappings: 23 Highest counter ID seen: c2 Function name: loops_branches::main -Raw bytes (44): 0x[01, 01, 00, 08, 01, 37, 01, 00, 0a, 01, 01, 09, 00, 13, 01, 00, 16, 00, 1f, 01, 01, 05, 00, 0d, 01, 01, 09, 00, 15, 01, 00, 18, 00, 23, 01, 01, 05, 00, 0d, 01, 01, 01, 00, 02] +Raw bytes (44): 0x[01, 01, 00, 08, 01, 37, 01, 00, 0a, 01, 01, 16, 00, 1f, 01, 01, 05, 00, 0d, 01, 00, 16, 00, 20, 01, 01, 18, 00, 23, 01, 01, 05, 00, 0d, 01, 00, 14, 00, 20, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/loops_branches.rs Number of expressions: 0 Number of file 0 mappings: 8 - Code(Counter(0)) at (prev + 55, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 19) -- Code(Counter(0)) at (prev + 0, 22) to (start + 0, 31) +- Code(Counter(0)) at (prev + 1, 22) to (start + 0, 31) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 21) -- Code(Counter(0)) at (prev + 0, 24) to (start + 0, 35) +- Code(Counter(0)) at (prev + 0, 22) to (start + 0, 32) +- Code(Counter(0)) at (prev + 1, 24) to (start + 0, 35) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 20) to (start + 0, 32) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/iffy/loops_branches.coverage b/tests/coverage/iffy/loops_branches.coverage index 7bd1a680f00e3..33be65fea84a1 100644 --- a/tests/coverage/iffy/loops_branches.coverage +++ b/tests/coverage/iffy/loops_branches.coverage @@ -16,8 +16,7 @@ LL| 0| } else { LL| 0| } LL| | - LL| 10| for i in 0..10 { - ^1 + LL| 1| for i in 0..10 { LL| 10| if true { LL| 10| if false { LL| 0| while true {} @@ -43,8 +42,7 @@ LL| 1| write!(f, "cool")?; ^0 LL| | } - LL| 10| for i in 0..10 { - ^1 + LL| 1| for i in 0..10 { LL| 10| if false { LL| 0| } else { LL| 10| if false { diff --git a/tests/coverage/iffy/match_or_pattern.cov-map b/tests/coverage/iffy/match_or_pattern.cov-map index 0bb126bc09b18..6c24b00f34bc7 100644 --- a/tests/coverage/iffy/match_or_pattern.cov-map +++ b/tests/coverage/iffy/match_or_pattern.cov-map @@ -1,5 +1,5 @@ Function name: match_or_pattern::main -Raw bytes (190): 0x[01, 01, 08, 01, 05, 01, 09, 01, 0d, 01, 11, 01, 15, 01, 19, 01, 1d, 01, 21, 22, 01, 01, 01, 00, 0a, 01, 04, 09, 00, 10, 01, 00, 13, 00, 2e, 01, 02, 09, 00, 0e, 01, 00, 10, 00, 12, 01, 00, 15, 00, 16, 01, 01, 09, 00, 0e, 01, 00, 10, 00, 12, 01, 00, 15, 00, 16, 01, 01, 08, 00, 0f, 05, 00, 10, 03, 06, 02, 03, 05, 00, 06, 01, 01, 0b, 00, 11, 06, 03, 1b, 00, 1d, 09, 01, 0e, 00, 10, 01, 02, 08, 00, 0f, 0d, 00, 10, 03, 06, 0a, 03, 05, 00, 06, 01, 01, 0b, 00, 11, 0e, 01, 1b, 00, 1d, 11, 01, 0e, 00, 10, 01, 02, 08, 00, 0f, 15, 00, 10, 03, 06, 12, 03, 05, 00, 06, 01, 01, 0b, 00, 11, 16, 01, 1b, 00, 1d, 19, 01, 0e, 00, 10, 01, 02, 08, 00, 0f, 1d, 00, 10, 03, 06, 1a, 03, 05, 00, 06, 01, 01, 0b, 00, 11, 1e, 01, 1b, 00, 1d, 21, 01, 0e, 00, 10, 01, 02, 01, 00, 02] +Raw bytes (185): 0x[01, 01, 08, 01, 05, 01, 09, 01, 0d, 01, 11, 01, 15, 01, 19, 01, 1d, 01, 21, 21, 01, 01, 01, 00, 0a, 01, 04, 13, 00, 2e, 01, 02, 15, 00, 16, 01, 01, 15, 00, 16, 01, 01, 08, 00, 0f, 05, 01, 09, 00, 0e, 05, 01, 09, 00, 0e, 02, 01, 05, 00, 06, 01, 01, 0b, 00, 11, 06, 03, 1b, 00, 1d, 09, 01, 0e, 00, 10, 01, 02, 08, 00, 0f, 0d, 01, 09, 00, 0e, 0d, 01, 09, 00, 0e, 0a, 01, 05, 00, 06, 01, 01, 0b, 00, 11, 0e, 01, 1b, 00, 1d, 11, 01, 0e, 00, 10, 01, 02, 08, 00, 0f, 15, 01, 09, 00, 0e, 15, 01, 09, 00, 0e, 12, 01, 05, 00, 06, 01, 01, 0b, 00, 11, 16, 01, 1b, 00, 1d, 19, 01, 0e, 00, 10, 01, 02, 08, 00, 0f, 1d, 01, 09, 00, 0e, 1d, 01, 09, 00, 0e, 1a, 01, 05, 00, 06, 01, 01, 0b, 00, 11, 1e, 01, 1b, 00, 1d, 21, 01, 0e, 00, 10, 01, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/match_or_pattern.rs Number of expressions: 8 @@ -11,43 +11,42 @@ Number of expressions: 8 - expression 5 operands: lhs = Counter(0), rhs = Counter(6) - expression 6 operands: lhs = Counter(0), rhs = Counter(7) - expression 7 operands: lhs = Counter(0), rhs = Counter(8) -Number of file 0 mappings: 34 +Number of file 0 mappings: 33 - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 4, 9) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 19) to (start + 0, 46) -- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 18) -- Code(Counter(0)) at (prev + 0, 21) to (start + 0, 22) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 18) -- Code(Counter(0)) at (prev + 0, 21) to (start + 0, 22) +- Code(Counter(0)) at (prev + 4, 19) to (start + 0, 46) +- Code(Counter(0)) at (prev + 2, 21) to (start + 0, 22) +- Code(Counter(0)) at (prev + 1, 21) to (start + 0, 22) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 15) -- Code(Counter(1)) at (prev + 0, 16) to (start + 3, 6) -- Code(Expression(0, Sub)) at (prev + 3, 5) to (start + 0, 6) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 14) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 14) +- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 6) = (c0 - c1) - Code(Counter(0)) at (prev + 1, 11) to (start + 0, 17) - Code(Expression(1, Sub)) at (prev + 3, 27) to (start + 0, 29) = (c0 - c2) - Code(Counter(2)) at (prev + 1, 14) to (start + 0, 16) - Code(Counter(0)) at (prev + 2, 8) to (start + 0, 15) -- Code(Counter(3)) at (prev + 0, 16) to (start + 3, 6) -- Code(Expression(2, Sub)) at (prev + 3, 5) to (start + 0, 6) +- Code(Counter(3)) at (prev + 1, 9) to (start + 0, 14) +- Code(Counter(3)) at (prev + 1, 9) to (start + 0, 14) +- Code(Expression(2, Sub)) at (prev + 1, 5) to (start + 0, 6) = (c0 - c3) - Code(Counter(0)) at (prev + 1, 11) to (start + 0, 17) - Code(Expression(3, Sub)) at (prev + 1, 27) to (start + 0, 29) = (c0 - c4) - Code(Counter(4)) at (prev + 1, 14) to (start + 0, 16) - Code(Counter(0)) at (prev + 2, 8) to (start + 0, 15) -- Code(Counter(5)) at (prev + 0, 16) to (start + 3, 6) -- Code(Expression(4, Sub)) at (prev + 3, 5) to (start + 0, 6) +- Code(Counter(5)) at (prev + 1, 9) to (start + 0, 14) +- Code(Counter(5)) at (prev + 1, 9) to (start + 0, 14) +- Code(Expression(4, Sub)) at (prev + 1, 5) to (start + 0, 6) = (c0 - c5) - Code(Counter(0)) at (prev + 1, 11) to (start + 0, 17) - Code(Expression(5, Sub)) at (prev + 1, 27) to (start + 0, 29) = (c0 - c6) - Code(Counter(6)) at (prev + 1, 14) to (start + 0, 16) - Code(Counter(0)) at (prev + 2, 8) to (start + 0, 15) -- Code(Counter(7)) at (prev + 0, 16) to (start + 3, 6) -- Code(Expression(6, Sub)) at (prev + 3, 5) to (start + 0, 6) +- Code(Counter(7)) at (prev + 1, 9) to (start + 0, 14) +- Code(Counter(7)) at (prev + 1, 9) to (start + 0, 14) +- Code(Expression(6, Sub)) at (prev + 1, 5) to (start + 0, 6) = (c0 - c7) - Code(Counter(0)) at (prev + 1, 11) to (start + 0, 17) - Code(Expression(7, Sub)) at (prev + 1, 27) to (start + 0, 29) diff --git a/tests/coverage/iffy/match_or_pattern.coverage b/tests/coverage/iffy/match_or_pattern.coverage index 50540bc5614ae..a485cab3e8b33 100644 --- a/tests/coverage/iffy/match_or_pattern.coverage +++ b/tests/coverage/iffy/match_or_pattern.coverage @@ -9,8 +9,7 @@ LL| 1| if is_true { LL| 1| a = 2; LL| 1| b = 0; - LL| 1| } - ^0 + LL| 0| } LL| 1| match (a, b) { LL| | // Or patterns generate MIR `SwitchInt` with multiple targets to the same `BasicBlock`. LL| | // This test confirms a fix for Issue #79569. @@ -20,8 +19,7 @@ LL| 1| if is_true { LL| 1| a = 0; LL| 1| b = 0; - LL| 1| } - ^0 + LL| 0| } LL| 1| match (a, b) { LL| 0| (0 | 1, 2 | 3) => {} LL| 1| _ => {} @@ -29,8 +27,7 @@ LL| 1| if is_true { LL| 1| a = 2; LL| 1| b = 2; - LL| 1| } - ^0 + LL| 0| } LL| 1| match (a, b) { LL| 0| (0 | 1, 2 | 3) => {} LL| 1| _ => {} @@ -38,8 +35,7 @@ LL| 1| if is_true { LL| 1| a = 0; LL| 1| b = 2; - LL| 1| } - ^0 + LL| 0| } LL| 1| match (a, b) { LL| 1| (0 | 1, 2 | 3) => {} LL| 0| _ => {} diff --git a/tests/coverage/iffy/nested_loops.cov-map b/tests/coverage/iffy/nested_loops.cov-map index 598068714b9a1..27dd61ae7776f 100644 --- a/tests/coverage/iffy/nested_loops.cov-map +++ b/tests/coverage/iffy/nested_loops.cov-map @@ -1,5 +1,5 @@ Function name: nested_loops::main -Raw bytes (164): 0x[01, 01, 14, 07, 47, 05, 0d, 01, 11, 47, 05, 01, 11, 47, 05, 01, 11, 47, 05, 01, 11, 47, 05, 01, 11, 3f, 05, 01, 09, 4b, 3f, 05, 15, 01, 09, 47, 4b, 01, 11, 05, 15, 05, 01, 18, 01, 01, 01, 00, 0a, 01, 01, 09, 00, 10, 01, 00, 13, 00, 2e, 01, 01, 09, 00, 16, 01, 00, 19, 00, 1b, 05, 02, 13, 00, 20, 09, 01, 0d, 00, 12, 09, 00, 15, 00, 18, 09, 01, 0d, 00, 12, 09, 00, 15, 00, 18, 09, 01, 12, 00, 17, 0d, 01, 10, 00, 16, 02, 01, 11, 00, 16, 26, 01, 0d, 00, 0e, 26, 01, 0d, 00, 13, 26, 01, 0d, 00, 13, 26, 01, 10, 00, 16, 15, 01, 11, 00, 18, 15, 01, 14, 00, 1b, 2e, 01, 15, 00, 21, 36, 01, 18, 02, 12, 42, 03, 0d, 00, 0e, 4e, 02, 09, 00, 17, 01, 02, 01, 00, 02] +Raw bytes (144): 0x[01, 01, 14, 07, 47, 05, 0d, 01, 11, 47, 05, 01, 11, 47, 05, 01, 11, 47, 05, 01, 11, 47, 05, 01, 11, 3f, 05, 01, 09, 4b, 3f, 05, 15, 01, 09, 47, 4b, 01, 11, 05, 15, 05, 01, 14, 01, 01, 01, 00, 0a, 01, 01, 13, 00, 2e, 01, 01, 19, 00, 1b, 05, 02, 13, 00, 20, 09, 01, 15, 00, 18, 09, 01, 15, 00, 18, 09, 01, 12, 00, 17, 0d, 01, 10, 00, 16, 02, 01, 11, 00, 16, 26, 01, 0d, 00, 0e, 26, 01, 0d, 00, 13, 26, 01, 0d, 00, 13, 26, 01, 10, 00, 16, 15, 01, 11, 00, 18, 15, 01, 14, 00, 1b, 2e, 01, 15, 00, 21, 36, 02, 15, 00, 1b, 42, 02, 0d, 00, 0e, 4e, 02, 09, 00, 17, 01, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/nested_loops.rs Number of expressions: 20 @@ -23,17 +23,13 @@ Number of expressions: 20 - expression 17 operands: lhs = Counter(0), rhs = Counter(4) - expression 18 operands: lhs = Counter(1), rhs = Counter(5) - expression 19 operands: lhs = Counter(1), rhs = Counter(0) -Number of file 0 mappings: 24 +Number of file 0 mappings: 20 - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 19) to (start + 0, 46) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 22) -- Code(Counter(0)) at (prev + 0, 25) to (start + 0, 27) +- Code(Counter(0)) at (prev + 1, 19) to (start + 0, 46) +- Code(Counter(0)) at (prev + 1, 25) to (start + 0, 27) - Code(Counter(1)) at (prev + 2, 19) to (start + 0, 32) -- Code(Counter(2)) at (prev + 1, 13) to (start + 0, 18) -- Code(Counter(2)) at (prev + 0, 21) to (start + 0, 24) -- Code(Counter(2)) at (prev + 1, 13) to (start + 0, 18) -- Code(Counter(2)) at (prev + 0, 21) to (start + 0, 24) +- Code(Counter(2)) at (prev + 1, 21) to (start + 0, 24) +- Code(Counter(2)) at (prev + 1, 21) to (start + 0, 24) - Code(Counter(2)) at (prev + 1, 18) to (start + 0, 23) - Code(Counter(3)) at (prev + 1, 16) to (start + 0, 22) - Code(Expression(0, Sub)) at (prev + 1, 17) to (start + 0, 22) @@ -50,9 +46,9 @@ Number of file 0 mappings: 24 - Code(Counter(5)) at (prev + 1, 20) to (start + 0, 27) - Code(Expression(11, Sub)) at (prev + 1, 21) to (start + 0, 33) = ((c0 + c2) - c1) -- Code(Expression(13, Sub)) at (prev + 1, 24) to (start + 2, 18) +- Code(Expression(13, Sub)) at (prev + 2, 21) to (start + 0, 27) = ((c1 + c5) - (c0 + c2)) -- Code(Expression(16, Sub)) at (prev + 3, 13) to (start + 0, 14) +- Code(Expression(16, Sub)) at (prev + 2, 13) to (start + 0, 14) = ((c0 + c4) - (c1 + c5)) - Code(Expression(19, Sub)) at (prev + 2, 9) to (start + 0, 23) = (c1 - c0) diff --git a/tests/coverage/iffy/nested_loops.coverage b/tests/coverage/iffy/nested_loops.coverage index fbbec43309ed8..862e43c8ea252 100644 --- a/tests/coverage/iffy/nested_loops.coverage +++ b/tests/coverage/iffy/nested_loops.coverage @@ -15,9 +15,9 @@ LL| 1| a -= 10; LL| 1| if is_true { LL| 1| break 'outer; - LL| 0| } else { + LL| | } else { LL| 0| a -= 2; - LL| 0| } + LL| | } LL| 2| } LL| | } LL| 0| countdown -= 1; diff --git a/tests/coverage/iffy/no_cov_crate.cov-map b/tests/coverage/iffy/no_cov_crate.cov-map index bdbce570b1964..e447cac4d8da9 100644 --- a/tests/coverage/iffy/no_cov_crate.cov-map +++ b/tests/coverage/iffy/no_cov_crate.cov-map @@ -1,96 +1,98 @@ Function name: no_cov_crate::add_coverage_1 -Raw bytes (19): 0x[01, 01, 00, 03, 01, 16, 01, 00, 14, 01, 01, 05, 00, 0d, 01, 01, 01, 00, 02] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 16, 01, 00, 14, 01, 01, 05, 00, 0d, 01, 00, 0e, 00, 22, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/no_cov_crate.rs Number of expressions: 0 -Number of file 0 mappings: 3 +Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 22, 1) to (start + 0, 20) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 34) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: no_cov_crate::add_coverage_2 -Raw bytes (19): 0x[01, 01, 00, 03, 01, 1a, 01, 00, 14, 01, 01, 05, 00, 0d, 01, 01, 01, 00, 02] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 1a, 01, 00, 14, 01, 01, 05, 00, 0d, 01, 00, 0e, 00, 22, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/no_cov_crate.rs Number of expressions: 0 -Number of file 0 mappings: 3 +Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 26, 1) to (start + 0, 20) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 34) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: no_cov_crate::add_coverage_not_called (unused) -Raw bytes (19): 0x[01, 01, 00, 03, 00, 1f, 01, 00, 1d, 00, 01, 05, 00, 0d, 00, 01, 01, 00, 02] +Raw bytes (24): 0x[01, 01, 00, 04, 00, 1f, 01, 00, 1d, 00, 01, 05, 00, 0d, 00, 00, 0e, 00, 26, 00, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/no_cov_crate.rs Number of expressions: 0 -Number of file 0 mappings: 3 +Number of file 0 mappings: 4 - Code(Zero) at (prev + 31, 1) to (start + 0, 29) - Code(Zero) at (prev + 1, 5) to (start + 0, 13) +- Code(Zero) at (prev + 0, 14) to (start + 0, 38) - Code(Zero) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: (none) Function name: no_cov_crate::main -Raw bytes (74): 0x[01, 01, 00, 0e, 01, 4f, 01, 00, 0a, 01, 01, 09, 00, 10, 01, 00, 13, 00, 2e, 01, 02, 05, 00, 1a, 01, 01, 05, 00, 1a, 01, 01, 05, 00, 13, 01, 01, 05, 00, 13, 01, 02, 05, 00, 22, 01, 00, 23, 00, 2a, 01, 01, 05, 00, 16, 01, 00, 17, 00, 1e, 01, 01, 05, 00, 23, 01, 00, 24, 00, 2b, 01, 01, 01, 00, 02] +Raw bytes (54): 0x[01, 01, 00, 0a, 01, 4f, 01, 00, 0a, 01, 01, 13, 00, 2e, 01, 02, 05, 00, 1c, 01, 01, 05, 00, 1c, 01, 01, 05, 00, 15, 01, 01, 05, 00, 15, 01, 02, 05, 00, 2b, 01, 01, 05, 00, 1f, 01, 01, 05, 00, 2c, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/no_cov_crate.rs Number of expressions: 0 -Number of file 0 mappings: 14 +Number of file 0 mappings: 10 - Code(Counter(0)) at (prev + 79, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 19) to (start + 0, 46) -- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 26) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 26) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 19) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 19) -- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 34) -- Code(Counter(0)) at (prev + 0, 35) to (start + 0, 42) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 22) -- Code(Counter(0)) at (prev + 0, 23) to (start + 0, 30) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 35) -- Code(Counter(0)) at (prev + 0, 36) to (start + 0, 43) +- Code(Counter(0)) at (prev + 1, 19) to (start + 0, 46) +- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 28) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 28) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 21) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 21) +- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 43) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 31) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 44) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: no_cov_crate::nested_fns::outer -Raw bytes (29): 0x[01, 01, 00, 05, 01, 33, 05, 00, 20, 01, 01, 09, 00, 11, 01, 01, 09, 00, 1a, 01, 00, 1b, 00, 22, 01, 0a, 05, 00, 06] +Raw bytes (29): 0x[01, 01, 00, 05, 01, 33, 05, 00, 20, 01, 01, 09, 00, 11, 01, 00, 12, 00, 26, 01, 01, 09, 00, 23, 01, 0a, 05, 00, 06] Number of files: 1 - file 0 => $DIR/no_cov_crate.rs Number of expressions: 0 Number of file 0 mappings: 5 - Code(Counter(0)) at (prev + 51, 5) to (start + 0, 32) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 17) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 26) -- Code(Counter(0)) at (prev + 0, 27) to (start + 0, 34) +- Code(Counter(0)) at (prev + 0, 18) to (start + 0, 38) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 35) - Code(Counter(0)) at (prev + 10, 5) to (start + 0, 6) Highest counter ID seen: c0 Function name: no_cov_crate::nested_fns::outer_both_covered -Raw bytes (29): 0x[01, 01, 00, 05, 01, 41, 05, 00, 2d, 01, 01, 09, 00, 11, 01, 01, 09, 00, 0e, 01, 00, 0f, 00, 16, 01, 09, 05, 00, 06] +Raw bytes (29): 0x[01, 01, 00, 05, 01, 41, 05, 00, 2d, 01, 01, 09, 00, 11, 01, 00, 12, 00, 26, 01, 01, 09, 00, 17, 01, 09, 05, 00, 06] Number of files: 1 - file 0 => $DIR/no_cov_crate.rs Number of expressions: 0 Number of file 0 mappings: 5 - Code(Counter(0)) at (prev + 65, 5) to (start + 0, 45) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 17) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 22) +- Code(Counter(0)) at (prev + 0, 18) to (start + 0, 38) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 23) - Code(Counter(0)) at (prev + 9, 5) to (start + 0, 6) Highest counter ID seen: c0 Function name: no_cov_crate::nested_fns::outer_both_covered::inner -Raw bytes (31): 0x[01, 01, 01, 01, 05, 05, 01, 45, 09, 00, 20, 01, 01, 10, 00, 17, 05, 00, 18, 02, 0e, 02, 02, 14, 02, 0e, 01, 03, 09, 00, 0a] +Raw bytes (41): 0x[01, 01, 01, 01, 05, 07, 01, 45, 09, 00, 20, 01, 01, 10, 00, 17, 05, 01, 11, 00, 19, 05, 00, 1a, 00, 2e, 02, 02, 11, 00, 19, 02, 00, 1a, 00, 32, 01, 02, 09, 00, 0a] Number of files: 1 - file 0 => $DIR/no_cov_crate.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 5 +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 69, 9) to (start + 0, 32) - Code(Counter(0)) at (prev + 1, 16) to (start + 0, 23) -- Code(Counter(1)) at (prev + 0, 24) to (start + 2, 14) -- Code(Expression(0, Sub)) at (prev + 2, 20) to (start + 2, 14) +- Code(Counter(1)) at (prev + 1, 17) to (start + 0, 25) +- Code(Counter(1)) at (prev + 0, 26) to (start + 0, 46) +- Code(Expression(0, Sub)) at (prev + 2, 17) to (start + 0, 25) + = (c0 - c1) +- Code(Expression(0, Sub)) at (prev + 0, 26) to (start + 0, 50) = (c0 - c1) -- Code(Counter(0)) at (prev + 3, 9) to (start + 0, 10) +- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 10) Highest counter ID seen: c1 diff --git a/tests/coverage/iffy/no_cov_crate.coverage b/tests/coverage/iffy/no_cov_crate.coverage index c6453e60a1a41..70143c0629a35 100644 --- a/tests/coverage/iffy/no_cov_crate.coverage +++ b/tests/coverage/iffy/no_cov_crate.coverage @@ -69,9 +69,9 @@ LL| 1| fn inner(is_true: bool) { LL| 1| if is_true { LL| 1| println!("called and covered"); - LL| 1| } else { + LL| | } else { LL| 0| println!("absolutely not covered"); - LL| 0| } + LL| | } LL| 1| } LL| 1| } LL| |} diff --git a/tests/coverage/iffy/overflow.cov-map b/tests/coverage/iffy/overflow.cov-map index 22a4ed0d49cd3..17e131066b3ed 100644 --- a/tests/coverage/iffy/overflow.cov-map +++ b/tests/coverage/iffy/overflow.cov-map @@ -1,5 +1,5 @@ Function name: overflow::main -Raw bytes (86): 0x[01, 01, 06, 05, 01, 05, 17, 01, 09, 05, 13, 17, 0d, 01, 09, 0e, 01, 10, 01, 00, 1c, 01, 01, 09, 00, 16, 01, 00, 19, 00, 1b, 05, 01, 0b, 00, 18, 02, 01, 0c, 00, 1a, 09, 00, 1b, 03, 0a, 09, 01, 11, 00, 17, 06, 02, 13, 00, 20, 0d, 00, 21, 03, 0a, 0d, 01, 11, 00, 17, 0e, 02, 09, 00, 0a, 02, 01, 09, 00, 17, 01, 02, 05, 00, 0b, 01, 01, 01, 00, 02] +Raw bytes (91): 0x[01, 01, 06, 05, 01, 05, 17, 01, 09, 05, 13, 17, 0d, 01, 09, 0f, 01, 10, 01, 00, 1c, 01, 01, 19, 00, 1b, 05, 01, 0b, 00, 18, 02, 01, 0c, 00, 1a, 09, 01, 1a, 00, 2c, 09, 01, 0d, 00, 15, 09, 00, 24, 00, 2a, 06, 01, 13, 00, 20, 0d, 01, 1a, 00, 2b, 0d, 01, 0d, 00, 15, 0d, 00, 24, 00, 2a, 0e, 01, 09, 00, 0a, 02, 01, 09, 00, 17, 01, 02, 05, 00, 0b, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/overflow.rs Number of expressions: 6 @@ -9,20 +9,21 @@ Number of expressions: 6 - expression 3 operands: lhs = Counter(1), rhs = Expression(4, Add) - expression 4 operands: lhs = Expression(5, Add), rhs = Counter(3) - expression 5 operands: lhs = Counter(0), rhs = Counter(2) -Number of file 0 mappings: 14 +Number of file 0 mappings: 15 - Code(Counter(0)) at (prev + 16, 1) to (start + 0, 28) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 22) -- Code(Counter(0)) at (prev + 0, 25) to (start + 0, 27) +- Code(Counter(0)) at (prev + 1, 25) to (start + 0, 27) - Code(Counter(1)) at (prev + 1, 11) to (start + 0, 24) - Code(Expression(0, Sub)) at (prev + 1, 12) to (start + 0, 26) = (c1 - c0) -- Code(Counter(2)) at (prev + 0, 27) to (start + 3, 10) -- Code(Counter(2)) at (prev + 1, 17) to (start + 0, 23) -- Code(Expression(1, Sub)) at (prev + 2, 19) to (start + 0, 32) +- Code(Counter(2)) at (prev + 1, 26) to (start + 0, 44) +- Code(Counter(2)) at (prev + 1, 13) to (start + 0, 21) +- Code(Counter(2)) at (prev + 0, 36) to (start + 0, 42) +- Code(Expression(1, Sub)) at (prev + 1, 19) to (start + 0, 32) = (c1 - (c0 + c2)) -- Code(Counter(3)) at (prev + 0, 33) to (start + 3, 10) -- Code(Counter(3)) at (prev + 1, 17) to (start + 0, 23) -- Code(Expression(3, Sub)) at (prev + 2, 9) to (start + 0, 10) +- Code(Counter(3)) at (prev + 1, 26) to (start + 0, 43) +- Code(Counter(3)) at (prev + 1, 13) to (start + 0, 21) +- Code(Counter(3)) at (prev + 0, 36) to (start + 0, 42) +- Code(Expression(3, Sub)) at (prev + 1, 9) to (start + 0, 10) = (c1 - ((c0 + c2) + c3)) - Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 23) = (c1 - c0) @@ -31,23 +32,25 @@ Number of file 0 mappings: 14 Highest counter ID seen: c3 Function name: overflow::might_overflow -Raw bytes (66): 0x[01, 01, 01, 01, 05, 0c, 01, 05, 01, 00, 26, 01, 01, 08, 00, 12, 05, 00, 13, 02, 06, 02, 02, 05, 00, 06, 01, 01, 09, 00, 0f, 01, 00, 12, 00, 1e, 01, 01, 05, 00, 0d, 01, 01, 09, 00, 0f, 01, 00, 12, 00, 21, 01, 01, 05, 00, 0d, 01, 01, 05, 00, 0b, 01, 01, 01, 00, 02] +Raw bytes (76): 0x[01, 01, 01, 01, 05, 0e, 01, 05, 01, 00, 26, 01, 01, 08, 00, 12, 05, 01, 09, 00, 11, 05, 00, 12, 00, 2f, 02, 01, 05, 00, 06, 01, 01, 12, 00, 1e, 01, 01, 05, 00, 0d, 01, 00, 28, 00, 2e, 01, 00, 30, 00, 36, 01, 01, 12, 00, 21, 01, 01, 05, 00, 0d, 01, 00, 0e, 00, 2f, 01, 01, 05, 00, 0b, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/overflow.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 12 +Number of file 0 mappings: 14 - Code(Counter(0)) at (prev + 5, 1) to (start + 0, 38) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 18) -- Code(Counter(1)) at (prev + 0, 19) to (start + 2, 6) -- Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 6) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 17) +- Code(Counter(1)) at (prev + 0, 18) to (start + 0, 47) +- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 6) = (c0 - c1) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 15) -- Code(Counter(0)) at (prev + 0, 18) to (start + 0, 30) +- Code(Counter(0)) at (prev + 1, 18) to (start + 0, 30) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 15) -- Code(Counter(0)) at (prev + 0, 18) to (start + 0, 33) +- Code(Counter(0)) at (prev + 0, 40) to (start + 0, 46) +- Code(Counter(0)) at (prev + 0, 48) to (start + 0, 54) +- Code(Counter(0)) at (prev + 1, 18) to (start + 0, 33) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 47) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 11) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c1 diff --git a/tests/coverage/iffy/panic_unwind.cov-map b/tests/coverage/iffy/panic_unwind.cov-map index 42a3587786194..53c83410ea4ed 100644 --- a/tests/coverage/iffy/panic_unwind.cov-map +++ b/tests/coverage/iffy/panic_unwind.cov-map @@ -1,5 +1,5 @@ Function name: panic_unwind::main -Raw bytes (76): 0x[01, 01, 06, 05, 01, 05, 17, 01, 09, 05, 13, 17, 0d, 01, 09, 0c, 01, 0d, 01, 00, 1c, 01, 01, 09, 00, 16, 01, 00, 19, 00, 1b, 05, 01, 0b, 00, 18, 02, 01, 0c, 00, 1a, 09, 00, 1b, 02, 0a, 06, 02, 13, 00, 20, 0d, 00, 21, 02, 0a, 0e, 02, 09, 00, 0a, 02, 01, 09, 00, 17, 01, 02, 05, 00, 0b, 01, 01, 01, 00, 02] +Raw bytes (71): 0x[01, 01, 06, 05, 01, 05, 17, 01, 09, 05, 13, 17, 0d, 01, 09, 0b, 01, 0d, 01, 00, 1c, 01, 01, 19, 00, 1b, 05, 01, 0b, 00, 18, 02, 01, 0c, 00, 1a, 09, 01, 0d, 00, 1e, 06, 01, 13, 00, 20, 0d, 01, 0d, 00, 1f, 0e, 01, 09, 00, 0a, 02, 01, 09, 00, 17, 01, 02, 05, 00, 0b, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/panic_unwind.rs Number of expressions: 6 @@ -9,18 +9,17 @@ Number of expressions: 6 - expression 3 operands: lhs = Counter(1), rhs = Expression(4, Add) - expression 4 operands: lhs = Expression(5, Add), rhs = Counter(3) - expression 5 operands: lhs = Counter(0), rhs = Counter(2) -Number of file 0 mappings: 12 +Number of file 0 mappings: 11 - Code(Counter(0)) at (prev + 13, 1) to (start + 0, 28) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 22) -- Code(Counter(0)) at (prev + 0, 25) to (start + 0, 27) +- Code(Counter(0)) at (prev + 1, 25) to (start + 0, 27) - Code(Counter(1)) at (prev + 1, 11) to (start + 0, 24) - Code(Expression(0, Sub)) at (prev + 1, 12) to (start + 0, 26) = (c1 - c0) -- Code(Counter(2)) at (prev + 0, 27) to (start + 2, 10) -- Code(Expression(1, Sub)) at (prev + 2, 19) to (start + 0, 32) +- Code(Counter(2)) at (prev + 1, 13) to (start + 0, 30) +- Code(Expression(1, Sub)) at (prev + 1, 19) to (start + 0, 32) = (c1 - (c0 + c2)) -- Code(Counter(3)) at (prev + 0, 33) to (start + 2, 10) -- Code(Expression(3, Sub)) at (prev + 2, 9) to (start + 0, 10) +- Code(Counter(3)) at (prev + 1, 13) to (start + 0, 31) +- Code(Expression(3, Sub)) at (prev + 1, 9) to (start + 0, 10) = (c1 - ((c0 + c2) + c3)) - Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 23) = (c1 - c0) @@ -29,19 +28,22 @@ Number of file 0 mappings: 12 Highest counter ID seen: c3 Function name: panic_unwind::might_panic -Raw bytes (36): 0x[01, 01, 01, 01, 05, 06, 01, 04, 01, 00, 23, 01, 01, 08, 00, 14, 05, 01, 09, 00, 11, 05, 01, 09, 00, 0f, 02, 01, 0c, 02, 06, 02, 03, 01, 00, 02] +Raw bytes (46): 0x[01, 01, 01, 01, 05, 08, 01, 04, 01, 00, 23, 01, 01, 08, 00, 14, 05, 01, 09, 00, 11, 05, 00, 12, 00, 20, 05, 01, 09, 00, 0f, 02, 02, 09, 00, 11, 02, 00, 12, 00, 1f, 02, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/panic_unwind.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 6 +Number of file 0 mappings: 8 - Code(Counter(0)) at (prev + 4, 1) to (start + 0, 35) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 20) - Code(Counter(1)) at (prev + 1, 9) to (start + 0, 17) +- Code(Counter(1)) at (prev + 0, 18) to (start + 0, 32) - Code(Counter(1)) at (prev + 1, 9) to (start + 0, 15) -- Code(Expression(0, Sub)) at (prev + 1, 12) to (start + 2, 6) +- Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 17) = (c0 - c1) -- Code(Expression(0, Sub)) at (prev + 3, 1) to (start + 0, 2) +- Code(Expression(0, Sub)) at (prev + 0, 18) to (start + 0, 31) + = (c0 - c1) +- Code(Expression(0, Sub)) at (prev + 2, 1) to (start + 0, 2) = (c0 - c1) Highest counter ID seen: c1 diff --git a/tests/coverage/iffy/panic_unwind.coverage b/tests/coverage/iffy/panic_unwind.coverage index a80ab6d16b01c..6082593d2573d 100644 --- a/tests/coverage/iffy/panic_unwind.coverage +++ b/tests/coverage/iffy/panic_unwind.coverage @@ -5,9 +5,9 @@ LL| 4| if should_panic { LL| 1| println!("panicking..."); LL| 1| panic!("panics"); - LL| 3| } else { + LL| | } else { LL| 3| println!("Don't Panic"); - LL| 3| } + LL| | } LL| 3|} LL| | LL| 1|fn main() -> Result<(), u8> { diff --git a/tests/coverage/iffy/partial_eq.cov-map b/tests/coverage/iffy/partial_eq.cov-map index 8def64a3f546d..ad07e2d6f5308 100644 --- a/tests/coverage/iffy/partial_eq.cov-map +++ b/tests/coverage/iffy/partial_eq.cov-map @@ -1,28 +1,32 @@ Function name: ::new -Raw bytes (24): 0x[01, 01, 00, 04, 01, 0c, 05, 00, 41, 01, 01, 09, 00, 25, 01, 00, 10, 00, 15, 01, 01, 05, 00, 06] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 0e, 05, 00, 41, 01, 01, 09, 00, 25, 01, 00, 10, 00, 15, 01, 01, 05, 00, 06] Number of files: 1 - file 0 => $DIR/partial_eq.rs Number of expressions: 0 Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 12, 5) to (start + 0, 65) +- Code(Counter(0)) at (prev + 14, 5) to (start + 0, 65) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 37) - Code(Counter(0)) at (prev + 0, 16) to (start + 0, 21) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 6) Highest counter ID seen: c0 Function name: partial_eq::main -Raw bytes (44): 0x[01, 01, 00, 08, 01, 11, 01, 00, 0a, 01, 01, 09, 00, 16, 01, 00, 19, 00, 25, 01, 01, 09, 00, 16, 01, 00, 19, 00, 25, 01, 02, 05, 00, 0d, 01, 04, 09, 00, 26, 01, 02, 01, 00, 02] +Raw bytes (64): 0x[01, 01, 00, 0c, 01, 13, 01, 00, 0a, 01, 01, 19, 00, 2e, 01, 00, 19, 00, 25, 01, 00, 26, 00, 27, 01, 01, 19, 00, 2e, 01, 00, 19, 00, 25, 01, 00, 26, 00, 27, 01, 02, 05, 00, 0d, 01, 02, 09, 00, 16, 01, 01, 09, 00, 16, 01, 01, 09, 00, 26, 01, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/partial_eq.rs Number of expressions: 0 -Number of file 0 mappings: 8 -- Code(Counter(0)) at (prev + 17, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 22) +Number of file 0 mappings: 12 +- Code(Counter(0)) at (prev + 19, 1) to (start + 0, 10) +- Code(Counter(0)) at (prev + 1, 25) to (start + 0, 46) - Code(Counter(0)) at (prev + 0, 25) to (start + 0, 37) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 22) +- Code(Counter(0)) at (prev + 0, 38) to (start + 0, 39) +- Code(Counter(0)) at (prev + 1, 25) to (start + 0, 46) - Code(Counter(0)) at (prev + 0, 25) to (start + 0, 37) +- Code(Counter(0)) at (prev + 0, 38) to (start + 0, 39) - Code(Counter(0)) at (prev + 2, 5) to (start + 0, 13) -- Code(Counter(0)) at (prev + 4, 9) to (start + 0, 38) +- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 22) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 22) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 38) - Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/iffy/partial_eq.coverage b/tests/coverage/iffy/partial_eq.coverage index 6efe6d71245e7..19e16535e27a6 100644 --- a/tests/coverage/iffy/partial_eq.coverage +++ b/tests/coverage/iffy/partial_eq.coverage @@ -1,3 +1,5 @@ + LL| |//@ min-llvm-version: 23 + LL| | LL| |// This test confirms an earlier problem was resolved, supporting the MIR graph generated by the LL| |// structure of this test. LL| | @@ -20,8 +22,8 @@ LL| | LL| 1| println!( LL| | "{:?} < {:?} = {}", - LL| | version_3_2_1, - LL| | version_3_3_0, + LL| 1| version_3_2_1, + LL| 1| version_3_3_0, LL| 1| version_3_2_1 < version_3_3_0, // LL| | ); LL| 1|} diff --git a/tests/coverage/iffy/partial_eq.rs b/tests/coverage/iffy/partial_eq.rs index 081502d4a9d64..d81ecbd8b3b7e 100644 --- a/tests/coverage/iffy/partial_eq.rs +++ b/tests/coverage/iffy/partial_eq.rs @@ -1,3 +1,5 @@ +//@ min-llvm-version: 23 + // This test confirms an earlier problem was resolved, supporting the MIR graph generated by the // structure of this test. diff --git a/tests/coverage/iffy/simple_loop.cov-map b/tests/coverage/iffy/simple_loop.cov-map index 5447ffdb6e7c7..7e6cf11e2513e 100644 --- a/tests/coverage/iffy/simple_loop.cov-map +++ b/tests/coverage/iffy/simple_loop.cov-map @@ -1,20 +1,18 @@ Function name: simple_loop::main -Raw bytes (75): 0x[01, 01, 03, 01, 05, 09, 01, 09, 01, 0d, 01, 04, 01, 00, 0a, 01, 04, 09, 00, 10, 01, 00, 13, 00, 2e, 01, 02, 09, 00, 16, 01, 00, 19, 00, 1a, 01, 03, 09, 00, 10, 05, 01, 05, 05, 06, 02, 05, 05, 00, 06, 09, 05, 0d, 02, 0e, 01, 04, 0d, 00, 12, 0a, 02, 09, 00, 0a, 0a, 01, 09, 02, 0a, 01, 05, 01, 00, 02] +Raw bytes (65): 0x[01, 01, 03, 01, 05, 09, 01, 09, 01, 0b, 01, 04, 01, 00, 0a, 01, 04, 13, 00, 2e, 01, 02, 19, 00, 1a, 01, 03, 09, 00, 10, 05, 02, 09, 02, 0f, 02, 04, 05, 00, 06, 09, 05, 0d, 02, 0e, 01, 04, 0d, 00, 12, 0a, 02, 09, 00, 0a, 0a, 01, 09, 02, 0a, 01, 05, 01, 00, 02] Number of files: 1 - file 0 => $DIR/simple_loop.rs Number of expressions: 3 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) - expression 1 operands: lhs = Counter(2), rhs = Counter(0) - expression 2 operands: lhs = Counter(2), rhs = Counter(0) -Number of file 0 mappings: 13 +Number of file 0 mappings: 11 - Code(Counter(0)) at (prev + 4, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 4, 9) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 19) to (start + 0, 46) -- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 22) -- Code(Counter(0)) at (prev + 0, 25) to (start + 0, 26) +- Code(Counter(0)) at (prev + 4, 19) to (start + 0, 46) +- Code(Counter(0)) at (prev + 2, 25) to (start + 0, 26) - Code(Counter(0)) at (prev + 3, 9) to (start + 0, 16) -- Code(Counter(1)) at (prev + 1, 5) to (start + 5, 6) -- Code(Expression(0, Sub)) at (prev + 5, 5) to (start + 0, 6) +- Code(Counter(1)) at (prev + 2, 9) to (start + 2, 15) +- Code(Expression(0, Sub)) at (prev + 4, 5) to (start + 0, 6) = (c0 - c1) - Code(Counter(2)) at (prev + 5, 13) to (start + 2, 14) - Code(Counter(0)) at (prev + 4, 13) to (start + 0, 18) diff --git a/tests/coverage/iffy/simple_loop.coverage b/tests/coverage/iffy/simple_loop.coverage index a75263f633e55..3f44adc86aa74 100644 --- a/tests/coverage/iffy/simple_loop.coverage +++ b/tests/coverage/iffy/simple_loop.coverage @@ -11,13 +11,12 @@ LL| | LL| | if LL| 1| is_true - LL| 1| { + LL| | { LL| 1| countdown LL| 1| = LL| 1| 10 - LL| 1| ; - LL| 1| } - ^0 + LL| | ; + LL| 0| } LL| | LL| | loop LL| | { diff --git a/tests/coverage/iffy/simple_match.cov-map b/tests/coverage/iffy/simple_match.cov-map index bc5a7e7b4bef4..c9322e42fa14a 100644 --- a/tests/coverage/iffy/simple_match.cov-map +++ b/tests/coverage/iffy/simple_match.cov-map @@ -1,5 +1,5 @@ Function name: simple_match::main -Raw bytes (99): 0x[01, 01, 05, 01, 05, 09, 01, 09, 01, 09, 13, 01, 0d, 11, 01, 04, 01, 00, 0a, 01, 04, 09, 00, 10, 01, 00, 13, 00, 2e, 01, 02, 09, 00, 16, 01, 00, 19, 00, 1a, 01, 01, 08, 00, 0f, 05, 00, 10, 02, 06, 02, 02, 05, 00, 06, 01, 05, 09, 00, 0d, 0a, 05, 0d, 00, 16, 0d, 02, 0d, 00, 0e, 0a, 02, 11, 02, 12, 0d, 04, 0d, 07, 0e, 0d, 01, 11, 00, 1e, 0d, 02, 15, 00, 16, 0e, 07, 0d, 00, 0f, 01, 03, 01, 00, 02] +Raw bytes (84): 0x[01, 01, 05, 01, 05, 09, 01, 09, 01, 09, 13, 01, 0d, 0e, 01, 04, 01, 00, 0a, 01, 04, 13, 00, 2e, 01, 02, 19, 00, 1a, 01, 01, 08, 00, 0f, 05, 01, 09, 00, 16, 02, 01, 05, 00, 06, 01, 05, 09, 00, 0d, 0a, 05, 0d, 00, 16, 0a, 04, 11, 02, 12, 0d, 05, 11, 00, 1e, 0d, 02, 19, 00, 22, 0d, 02, 11, 00, 1f, 0e, 05, 0d, 00, 0f, 01, 03, 01, 00, 02] Number of files: 1 - file 0 => $DIR/simple_match.rs Number of expressions: 5 @@ -8,26 +8,23 @@ Number of expressions: 5 - expression 2 operands: lhs = Counter(2), rhs = Counter(0) - expression 3 operands: lhs = Counter(2), rhs = Expression(4, Add) - expression 4 operands: lhs = Counter(0), rhs = Counter(3) -Number of file 0 mappings: 17 +Number of file 0 mappings: 14 - Code(Counter(0)) at (prev + 4, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 4, 9) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 19) to (start + 0, 46) -- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 22) -- Code(Counter(0)) at (prev + 0, 25) to (start + 0, 26) +- Code(Counter(0)) at (prev + 4, 19) to (start + 0, 46) +- Code(Counter(0)) at (prev + 2, 25) to (start + 0, 26) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 15) -- Code(Counter(1)) at (prev + 0, 16) to (start + 2, 6) -- Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 6) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 22) +- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 6) = (c0 - c1) - Code(Counter(0)) at (prev + 5, 9) to (start + 0, 13) - Code(Expression(2, Sub)) at (prev + 5, 13) to (start + 0, 22) = (c2 - c0) -- Code(Counter(3)) at (prev + 2, 13) to (start + 0, 14) -- Code(Expression(2, Sub)) at (prev + 2, 17) to (start + 2, 18) +- Code(Expression(2, Sub)) at (prev + 4, 17) to (start + 2, 18) = (c2 - c0) -- Code(Counter(3)) at (prev + 4, 13) to (start + 7, 14) -- Code(Counter(3)) at (prev + 1, 17) to (start + 0, 30) -- Code(Counter(3)) at (prev + 2, 21) to (start + 0, 22) -- Code(Expression(3, Sub)) at (prev + 7, 13) to (start + 0, 15) +- Code(Counter(3)) at (prev + 5, 17) to (start + 0, 30) +- Code(Counter(3)) at (prev + 2, 25) to (start + 0, 34) +- Code(Counter(3)) at (prev + 2, 17) to (start + 0, 31) +- Code(Expression(3, Sub)) at (prev + 5, 13) to (start + 0, 15) = (c2 - (c0 + c3)) - Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2) Highest counter ID seen: c3 diff --git a/tests/coverage/iffy/simple_match.coverage b/tests/coverage/iffy/simple_match.coverage index bd3f81aa8a1eb..aec843bb6cd4f 100644 --- a/tests/coverage/iffy/simple_match.coverage +++ b/tests/coverage/iffy/simple_match.coverage @@ -10,8 +10,7 @@ LL| 1| let mut countdown = 1; LL| 1| if is_true { LL| 1| countdown = 0; - LL| 1| } - ^0 + LL| 0| } LL| | LL| | for LL| | _ @@ -23,20 +22,20 @@ LL| | match LL| 2| countdown LL| | { - LL| 1| x + LL| | x LL| | if LL| 2| x LL| 2| < LL| 2| 1 LL| | => - LL| 1| { + LL| | { LL| 1| z = countdown - LL| 1| ; + LL| | ; LL| 1| let y = countdown - LL| 1| ; + LL| | ; LL| 1| countdown = 10 - LL| 1| ; - LL| 1| } + LL| | ; + LL| | } LL| | _ LL| | => LL| 1| {} diff --git a/tests/coverage/iffy/try_error_result.cov-map b/tests/coverage/iffy/try_error_result.cov-map index fa937cfb7755c..2e075b4b5f248 100644 --- a/tests/coverage/iffy/try_error_result.cov-map +++ b/tests/coverage/iffy/try_error_result.cov-map @@ -44,17 +44,15 @@ Number of file 0 mappings: 5 Highest counter ID seen: c1 Function name: try_error_result::main -Raw bytes (46): 0x[01, 01, 01, 01, 05, 08, 01, 71, 01, 00, 1c, 01, 01, 05, 00, 0a, 01, 00, 0d, 00, 17, 01, 00, 18, 00, 2b, 01, 01, 05, 00, 0a, 05, 01, 05, 00, 06, 02, 02, 05, 00, 0b, 01, 01, 01, 00, 02] +Raw bytes (36): 0x[01, 01, 01, 01, 05, 06, 01, 71, 01, 00, 1c, 01, 01, 05, 00, 2c, 01, 01, 05, 00, 0c, 05, 01, 05, 00, 06, 02, 02, 05, 00, 0b, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/try_error_result.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 8 +Number of file 0 mappings: 6 - Code(Counter(0)) at (prev + 113, 1) to (start + 0, 28) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 10) -- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 23) -- Code(Counter(0)) at (prev + 0, 24) to (start + 0, 43) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 10) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 44) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 12) - Code(Counter(1)) at (prev + 1, 5) to (start + 0, 6) - Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 11) = (c0 - c1) @@ -62,7 +60,7 @@ Number of file 0 mappings: 8 Highest counter ID seen: c1 Function name: try_error_result::test1 -Raw bytes (82): 0x[01, 01, 04, 07, 09, 01, 05, 09, 01, 09, 05, 0e, 01, 0d, 01, 00, 1d, 01, 01, 09, 01, 12, 01, 01, 15, 00, 17, 01, 05, 09, 00, 0e, 05, 02, 09, 01, 11, 05, 04, 0d, 00, 1a, 02, 02, 0d, 00, 11, 02, 00, 29, 00, 2a, 00, 01, 0d, 00, 11, 00, 00, 2a, 00, 2b, 0a, 04, 0d, 00, 11, 00, 00, 2a, 00, 2b, 0e, 03, 05, 00, 0b, 01, 01, 01, 00, 02] +Raw bytes (77): 0x[01, 01, 04, 07, 09, 01, 05, 09, 01, 09, 05, 0d, 01, 0d, 01, 00, 1d, 01, 02, 15, 00, 17, 01, 05, 09, 00, 0e, 05, 02, 09, 01, 11, 05, 04, 0d, 00, 1a, 02, 02, 0d, 00, 29, 02, 00, 29, 00, 2a, 00, 01, 0d, 00, 2a, 00, 00, 2a, 00, 2b, 0a, 04, 0d, 00, 2a, 00, 00, 2a, 00, 2b, 0e, 03, 05, 00, 0b, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/try_error_result.rs Number of expressions: 4 @@ -70,20 +68,19 @@ Number of expressions: 4 - expression 1 operands: lhs = Counter(0), rhs = Counter(1) - expression 2 operands: lhs = Counter(2), rhs = Counter(0) - expression 3 operands: lhs = Counter(2), rhs = Counter(1) -Number of file 0 mappings: 14 +Number of file 0 mappings: 13 - Code(Counter(0)) at (prev + 13, 1) to (start + 0, 29) -- Code(Counter(0)) at (prev + 1, 9) to (start + 1, 18) -- Code(Counter(0)) at (prev + 1, 21) to (start + 0, 23) +- Code(Counter(0)) at (prev + 2, 21) to (start + 0, 23) - Code(Counter(0)) at (prev + 5, 9) to (start + 0, 14) - Code(Counter(1)) at (prev + 2, 9) to (start + 1, 17) - Code(Counter(1)) at (prev + 4, 13) to (start + 0, 26) -- Code(Expression(0, Sub)) at (prev + 2, 13) to (start + 0, 17) +- Code(Expression(0, Sub)) at (prev + 2, 13) to (start + 0, 41) = ((c0 + c1) - c2) - Code(Expression(0, Sub)) at (prev + 0, 41) to (start + 0, 42) = ((c0 + c1) - c2) -- Code(Zero) at (prev + 1, 13) to (start + 0, 17) +- Code(Zero) at (prev + 1, 13) to (start + 0, 42) - Code(Zero) at (prev + 0, 42) to (start + 0, 43) -- Code(Expression(2, Sub)) at (prev + 4, 13) to (start + 0, 17) +- Code(Expression(2, Sub)) at (prev + 4, 13) to (start + 0, 42) = (c2 - c0) - Code(Zero) at (prev + 0, 42) to (start + 0, 43) - Code(Expression(3, Sub)) at (prev + 3, 5) to (start + 0, 11) @@ -92,7 +89,7 @@ Number of file 0 mappings: 14 Highest counter ID seen: c1 Function name: try_error_result::test2 -Raw bytes (325): 0x[01, 01, 12, 07, 09, 01, 05, 09, 01, 09, 01, 09, 01, 09, 01, 09, 01, 09, 01, 09, 01, 09, 01, 09, 01, 09, 01, 09, 01, 09, 01, 09, 01, 09, 01, 09, 01, 09, 05, 39, 01, 3d, 01, 00, 1d, 01, 01, 09, 00, 0f, 01, 00, 12, 00, 1a, 01, 01, 09, 01, 12, 01, 01, 15, 00, 17, 01, 05, 09, 00, 0e, 05, 02, 09, 01, 11, 05, 04, 0d, 00, 1a, 02, 02, 0d, 00, 13, 02, 00, 14, 00, 1f, 00, 00, 2f, 00, 30, 02, 00, 31, 00, 35, 02, 00, 45, 00, 4f, 02, 00, 50, 00, 62, 02, 01, 0d, 00, 13, 02, 02, 11, 00, 1c, 00, 01, 11, 00, 12, 02, 02, 11, 00, 15, 02, 02, 11, 00, 1b, 02, 01, 15, 00, 27, 00, 02, 11, 00, 14, 02, 00, 17, 00, 1d, 02, 00, 1e, 00, 29, 02, 00, 41, 00, 42, 00, 00, 43, 00, 47, 00, 00, 5f, 00, 60, 00, 01, 0d, 00, 17, 00, 01, 11, 00, 14, 00, 00, 17, 00, 1d, 00, 00, 1e, 00, 29, 00, 00, 41, 00, 42, 00, 00, 43, 00, 47, 00, 00, 60, 00, 61, 00, 01, 0d, 00, 17, 42, 04, 11, 00, 14, 42, 00, 17, 00, 1d, 42, 00, 1e, 00, 29, 00, 00, 42, 00, 43, 42, 00, 44, 00, 48, 00, 00, 61, 00, 62, 42, 01, 0d, 00, 17, 42, 01, 11, 00, 14, 42, 00, 17, 00, 1d, 42, 01, 12, 00, 1d, 00, 00, 36, 00, 37, 42, 01, 12, 00, 16, 00, 00, 2f, 00, 30, 42, 01, 0d, 00, 17, 42, 01, 11, 00, 14, 42, 00, 17, 00, 1d, 42, 01, 12, 00, 1d, 00, 01, 11, 00, 12, 42, 01, 12, 00, 16, 00, 01, 11, 00, 12, 42, 02, 0d, 00, 17, 46, 03, 05, 00, 0b, 01, 01, 01, 00, 02] +Raw bytes (295): 0x[01, 01, 12, 07, 09, 01, 05, 09, 01, 09, 01, 09, 01, 09, 01, 09, 01, 09, 01, 09, 01, 09, 01, 09, 01, 09, 01, 09, 01, 09, 01, 09, 01, 09, 01, 09, 01, 09, 05, 33, 01, 3d, 01, 00, 1d, 01, 01, 12, 00, 1a, 01, 02, 15, 00, 17, 01, 05, 09, 00, 0e, 05, 02, 09, 01, 11, 05, 04, 0d, 00, 1a, 02, 02, 0d, 00, 2f, 00, 00, 2f, 00, 30, 02, 00, 3f, 00, 43, 02, 00, 50, 00, 62, 02, 01, 0d, 02, 35, 00, 03, 11, 00, 12, 02, 02, 28, 00, 2c, 02, 03, 15, 00, 27, 02, 02, 17, 00, 41, 02, 00, 41, 00, 42, 00, 00, 5a, 00, 5e, 00, 00, 5f, 00, 60, 00, 01, 0d, 00, 17, 00, 00, 18, 00, 1b, 00, 00, 1d, 00, 1f, 00, 01, 17, 00, 41, 00, 00, 41, 00, 42, 00, 00, 5a, 00, 5f, 00, 00, 60, 00, 61, 00, 01, 0d, 00, 17, 00, 00, 18, 00, 1b, 00, 00, 1d, 00, 1f, 42, 04, 17, 00, 42, 00, 00, 42, 00, 43, 42, 00, 5b, 00, 60, 00, 00, 61, 00, 62, 42, 01, 0d, 00, 17, 42, 00, 18, 00, 1b, 42, 00, 1d, 00, 1f, 42, 01, 17, 01, 36, 00, 01, 36, 00, 37, 42, 01, 29, 00, 2e, 00, 00, 2f, 00, 30, 42, 01, 0d, 00, 17, 42, 00, 18, 00, 1b, 42, 00, 1d, 00, 1f, 42, 01, 17, 01, 36, 00, 02, 11, 00, 12, 42, 01, 29, 00, 2e, 00, 01, 11, 00, 12, 42, 02, 0d, 00, 17, 42, 00, 18, 00, 1b, 42, 00, 1d, 00, 1f, 46, 03, 05, 00, 0b, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/try_error_result.rs Number of expressions: 18 @@ -114,90 +111,79 @@ Number of expressions: 18 - expression 15 operands: lhs = Counter(2), rhs = Counter(0) - expression 16 operands: lhs = Counter(2), rhs = Counter(0) - expression 17 operands: lhs = Counter(2), rhs = Counter(1) -Number of file 0 mappings: 57 +Number of file 0 mappings: 51 - Code(Counter(0)) at (prev + 61, 1) to (start + 0, 29) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 15) -- Code(Counter(0)) at (prev + 0, 18) to (start + 0, 26) -- Code(Counter(0)) at (prev + 1, 9) to (start + 1, 18) -- Code(Counter(0)) at (prev + 1, 21) to (start + 0, 23) +- Code(Counter(0)) at (prev + 1, 18) to (start + 0, 26) +- Code(Counter(0)) at (prev + 2, 21) to (start + 0, 23) - Code(Counter(0)) at (prev + 5, 9) to (start + 0, 14) - Code(Counter(1)) at (prev + 2, 9) to (start + 1, 17) - Code(Counter(1)) at (prev + 4, 13) to (start + 0, 26) -- Code(Expression(0, Sub)) at (prev + 2, 13) to (start + 0, 19) - = ((c0 + c1) - c2) -- Code(Expression(0, Sub)) at (prev + 0, 20) to (start + 0, 31) +- Code(Expression(0, Sub)) at (prev + 2, 13) to (start + 0, 47) = ((c0 + c1) - c2) - Code(Zero) at (prev + 0, 47) to (start + 0, 48) -- Code(Expression(0, Sub)) at (prev + 0, 49) to (start + 0, 53) - = ((c0 + c1) - c2) -- Code(Expression(0, Sub)) at (prev + 0, 69) to (start + 0, 79) +- Code(Expression(0, Sub)) at (prev + 0, 63) to (start + 0, 67) = ((c0 + c1) - c2) - Code(Expression(0, Sub)) at (prev + 0, 80) to (start + 0, 98) = ((c0 + c1) - c2) -- Code(Expression(0, Sub)) at (prev + 1, 13) to (start + 0, 19) - = ((c0 + c1) - c2) -- Code(Expression(0, Sub)) at (prev + 2, 17) to (start + 0, 28) - = ((c0 + c1) - c2) -- Code(Zero) at (prev + 1, 17) to (start + 0, 18) -- Code(Expression(0, Sub)) at (prev + 2, 17) to (start + 0, 21) - = ((c0 + c1) - c2) -- Code(Expression(0, Sub)) at (prev + 2, 17) to (start + 0, 27) +- Code(Expression(0, Sub)) at (prev + 1, 13) to (start + 2, 53) = ((c0 + c1) - c2) -- Code(Expression(0, Sub)) at (prev + 1, 21) to (start + 0, 39) +- Code(Zero) at (prev + 3, 17) to (start + 0, 18) +- Code(Expression(0, Sub)) at (prev + 2, 40) to (start + 0, 44) = ((c0 + c1) - c2) -- Code(Zero) at (prev + 2, 17) to (start + 0, 20) -- Code(Expression(0, Sub)) at (prev + 0, 23) to (start + 0, 29) +- Code(Expression(0, Sub)) at (prev + 3, 21) to (start + 0, 39) = ((c0 + c1) - c2) -- Code(Expression(0, Sub)) at (prev + 0, 30) to (start + 0, 41) +- Code(Expression(0, Sub)) at (prev + 2, 23) to (start + 0, 65) = ((c0 + c1) - c2) - Code(Expression(0, Sub)) at (prev + 0, 65) to (start + 0, 66) = ((c0 + c1) - c2) -- Code(Zero) at (prev + 0, 67) to (start + 0, 71) +- Code(Zero) at (prev + 0, 90) to (start + 0, 94) - Code(Zero) at (prev + 0, 95) to (start + 0, 96) - Code(Zero) at (prev + 1, 13) to (start + 0, 23) -- Code(Zero) at (prev + 1, 17) to (start + 0, 20) -- Code(Zero) at (prev + 0, 23) to (start + 0, 29) -- Code(Zero) at (prev + 0, 30) to (start + 0, 41) +- Code(Zero) at (prev + 0, 24) to (start + 0, 27) +- Code(Zero) at (prev + 0, 29) to (start + 0, 31) +- Code(Zero) at (prev + 1, 23) to (start + 0, 65) - Code(Zero) at (prev + 0, 65) to (start + 0, 66) -- Code(Zero) at (prev + 0, 67) to (start + 0, 71) +- Code(Zero) at (prev + 0, 90) to (start + 0, 95) - Code(Zero) at (prev + 0, 96) to (start + 0, 97) - Code(Zero) at (prev + 1, 13) to (start + 0, 23) -- Code(Expression(16, Sub)) at (prev + 4, 17) to (start + 0, 20) - = (c2 - c0) -- Code(Expression(16, Sub)) at (prev + 0, 23) to (start + 0, 29) - = (c2 - c0) -- Code(Expression(16, Sub)) at (prev + 0, 30) to (start + 0, 41) +- Code(Zero) at (prev + 0, 24) to (start + 0, 27) +- Code(Zero) at (prev + 0, 29) to (start + 0, 31) +- Code(Expression(16, Sub)) at (prev + 4, 23) to (start + 0, 66) = (c2 - c0) - Code(Zero) at (prev + 0, 66) to (start + 0, 67) -- Code(Expression(16, Sub)) at (prev + 0, 68) to (start + 0, 72) +- Code(Expression(16, Sub)) at (prev + 0, 91) to (start + 0, 96) = (c2 - c0) - Code(Zero) at (prev + 0, 97) to (start + 0, 98) - Code(Expression(16, Sub)) at (prev + 1, 13) to (start + 0, 23) = (c2 - c0) -- Code(Expression(16, Sub)) at (prev + 1, 17) to (start + 0, 20) +- Code(Expression(16, Sub)) at (prev + 0, 24) to (start + 0, 27) = (c2 - c0) -- Code(Expression(16, Sub)) at (prev + 0, 23) to (start + 0, 29) +- Code(Expression(16, Sub)) at (prev + 0, 29) to (start + 0, 31) = (c2 - c0) -- Code(Expression(16, Sub)) at (prev + 1, 18) to (start + 0, 29) +- Code(Expression(16, Sub)) at (prev + 1, 23) to (start + 1, 54) = (c2 - c0) -- Code(Zero) at (prev + 0, 54) to (start + 0, 55) -- Code(Expression(16, Sub)) at (prev + 1, 18) to (start + 0, 22) +- Code(Zero) at (prev + 1, 54) to (start + 0, 55) +- Code(Expression(16, Sub)) at (prev + 1, 41) to (start + 0, 46) = (c2 - c0) - Code(Zero) at (prev + 0, 47) to (start + 0, 48) - Code(Expression(16, Sub)) at (prev + 1, 13) to (start + 0, 23) = (c2 - c0) -- Code(Expression(16, Sub)) at (prev + 1, 17) to (start + 0, 20) +- Code(Expression(16, Sub)) at (prev + 0, 24) to (start + 0, 27) = (c2 - c0) -- Code(Expression(16, Sub)) at (prev + 0, 23) to (start + 0, 29) +- Code(Expression(16, Sub)) at (prev + 0, 29) to (start + 0, 31) = (c2 - c0) -- Code(Expression(16, Sub)) at (prev + 1, 18) to (start + 0, 29) +- Code(Expression(16, Sub)) at (prev + 1, 23) to (start + 1, 54) = (c2 - c0) -- Code(Zero) at (prev + 1, 17) to (start + 0, 18) -- Code(Expression(16, Sub)) at (prev + 1, 18) to (start + 0, 22) +- Code(Zero) at (prev + 2, 17) to (start + 0, 18) +- Code(Expression(16, Sub)) at (prev + 1, 41) to (start + 0, 46) = (c2 - c0) - Code(Zero) at (prev + 1, 17) to (start + 0, 18) - Code(Expression(16, Sub)) at (prev + 2, 13) to (start + 0, 23) = (c2 - c0) +- Code(Expression(16, Sub)) at (prev + 0, 24) to (start + 0, 27) + = (c2 - c0) +- Code(Expression(16, Sub)) at (prev + 0, 29) to (start + 0, 31) + = (c2 - c0) - Code(Expression(17, Sub)) at (prev + 3, 5) to (start + 0, 11) = (c2 - c1) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) diff --git a/tests/coverage/iffy/try_error_result.coverage b/tests/coverage/iffy/try_error_result.coverage index 193c92cad48fe..e84ce89f129dd 100644 --- a/tests/coverage/iffy/try_error_result.coverage +++ b/tests/coverage/iffy/try_error_result.coverage @@ -11,7 +11,7 @@ LL| 6|} LL| | LL| 1|fn test1() -> Result<(), ()> { - LL| 1| let mut + LL| | let mut LL| 1| countdown = 10 LL| | ; LL| | for @@ -61,7 +61,7 @@ LL| | LL| 1|fn test2() -> Result<(), ()> { LL| 1| let thing1 = Thing1{}; - LL| 1| let mut + LL| | let mut LL| 1| countdown = 10 LL| | ; LL| | for @@ -78,17 +78,17 @@ LL| 1| thing1.get_thing_2(/*err=*/ false)?.call(/*err=*/ true).expect_err("call should fail"); ^0 LL| 1| thing1 - LL| | . + LL| 1| . LL| 1| get_thing_2(/*return_error=*/ false) LL| 0| ? LL| | . LL| 1| call(/*return_error=*/ true) LL| | . - LL| 1| expect_err( + LL| | expect_err( LL| 1| "call should fail" LL| | ); LL| 1| let val = thing1.get_thing_2(/*return_error=*/ true)?.call(/*return_error=*/ true)?; - ^0 ^0 ^0 + ^0 ^0 LL| 0| assert_eq!(val, 57); LL| 0| let val = thing1.get_thing_2(/*return_error=*/ true)?.call(/*return_error=*/ false)?; LL| 0| assert_eq!(val, 57); diff --git a/tests/coverage/iffy/uses_crate.cov-map b/tests/coverage/iffy/uses_crate.cov-map index fd65fa03dcdb6..92dc4d3301960 100644 --- a/tests/coverage/iffy/uses_crate.cov-map +++ b/tests/coverage/iffy/uses_crate.cov-map @@ -1,63 +1,68 @@ Function name: used_crate::used_from_bin_crate_and_lib_crate_generic_function::> -Raw bytes (19): 0x[01, 01, 00, 03, 01, 1b, 01, 00, 4c, 01, 01, 05, 00, 0d, 01, 01, 01, 00, 02] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 1b, 01, 00, 4c, 01, 01, 05, 00, 0d, 01, 00, 48, 00, 4b, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/auxiliary/used_crate.rs Number of expressions: 0 -Number of file 0 mappings: 3 +Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 27, 1) to (start + 0, 76) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 72) to (start + 0, 75) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: used_crate::used_only_from_bin_crate_generic_function::<&alloc::vec::Vec> -Raw bytes (19): 0x[01, 01, 00, 03, 01, 13, 01, 00, 43, 01, 01, 05, 00, 0d, 01, 01, 01, 00, 02] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 13, 01, 00, 43, 01, 01, 05, 00, 0d, 01, 00, 3f, 00, 42, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/auxiliary/used_crate.rs Number of expressions: 0 -Number of file 0 mappings: 3 +Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 19, 1) to (start + 0, 67) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 63) to (start + 0, 66) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: used_crate::used_only_from_bin_crate_generic_function::<&str> -Raw bytes (19): 0x[01, 01, 00, 03, 01, 13, 01, 00, 43, 01, 01, 05, 00, 0d, 01, 01, 01, 00, 02] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 13, 01, 00, 43, 01, 01, 05, 00, 0d, 01, 00, 3f, 00, 42, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/auxiliary/used_crate.rs Number of expressions: 0 -Number of file 0 mappings: 3 +Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 19, 1) to (start + 0, 67) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 63) to (start + 0, 66) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: used_crate::used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str> -Raw bytes (19): 0x[01, 01, 00, 03, 01, 1f, 01, 00, 5b, 01, 01, 05, 00, 0d, 01, 01, 01, 00, 02] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 1f, 01, 00, 5b, 01, 01, 05, 00, 0d, 01, 00, 57, 00, 5a, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/auxiliary/used_crate.rs Number of expressions: 0 -Number of file 0 mappings: 3 +Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 31, 1) to (start + 0, 91) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 87) to (start + 0, 90) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: uses_crate::main -Raw bytes (59): 0x[01, 02, 00, 0b, 01, 0c, 01, 00, 0a, 01, 01, 05, 00, 1e, 01, 01, 09, 00, 11, 01, 00, 14, 00, 18, 01, 01, 05, 00, 3a, 01, 00, 3b, 00, 44, 01, 01, 05, 00, 3a, 01, 01, 05, 00, 43, 01, 00, 44, 00, 4c, 01, 01, 05, 00, 52, 01, 01, 01, 00, 02] +Raw bytes (64): 0x[01, 02, 00, 0c, 01, 0c, 01, 00, 0a, 01, 01, 05, 00, 20, 01, 01, 14, 00, 18, 01, 00, 19, 00, 1a, 01, 00, 1c, 00, 1d, 01, 00, 1f, 00, 20, 01, 00, 22, 00, 23, 01, 01, 05, 00, 45, 01, 01, 05, 00, 59, 01, 01, 05, 00, 4d, 01, 01, 05, 00, 62, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/uses_crate.rs Number of expressions: 0 -Number of file 0 mappings: 11 +Number of file 0 mappings: 12 - Code(Counter(0)) at (prev + 12, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 30) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 17) -- Code(Counter(0)) at (prev + 0, 20) to (start + 0, 24) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 58) -- Code(Counter(0)) at (prev + 0, 59) to (start + 0, 68) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 58) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 67) -- Code(Counter(0)) at (prev + 0, 68) to (start + 0, 76) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 82) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 32) +- Code(Counter(0)) at (prev + 1, 20) to (start + 0, 24) +- Code(Counter(0)) at (prev + 0, 25) to (start + 0, 26) +- Code(Counter(0)) at (prev + 0, 28) to (start + 0, 29) +- Code(Counter(0)) at (prev + 0, 31) to (start + 0, 32) +- Code(Counter(0)) at (prev + 0, 34) to (start + 0, 35) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 69) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 89) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 77) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 98) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/iffy/uses_crate.coverage b/tests/coverage/iffy/uses_crate.coverage index 145c0649ac7b9..7bf1715067db9 100644 --- a/tests/coverage/iffy/uses_crate.coverage +++ b/tests/coverage/iffy/uses_crate.coverage @@ -13,8 +13,7 @@ $DIR/auxiliary/used_crate.rs: LL| 1| let mut countdown = 0; LL| 1| if is_true { LL| 1| countdown = 10; - LL| 1| } - ^0 + LL| 0| } LL| 1| use_this_lib_crate(); LL| 1|} LL| | @@ -104,8 +103,8 @@ $DIR/auxiliary/used_crate.rs: LL| 1|fn use_this_lib_crate() { LL| 1| used_from_bin_crate_and_lib_crate_generic_function("used from library used_crate.rs"); LL| 1| used_with_same_type_from_bin_crate_and_lib_crate_generic_function( - LL| | "used from library used_crate.rs", - LL| | ); + LL| 1| "used from library used_crate.rs", + LL| 1| ); LL| 1| let some_vec = vec![5, 6, 7, 8]; LL| 1| used_only_from_this_lib_crate_generic_function(some_vec); LL| 1| used_only_from_this_lib_crate_generic_function("used ONLY from library used_crate.rs"); diff --git a/tests/coverage/iffy/uses_inline_crate.cov-map b/tests/coverage/iffy/uses_inline_crate.cov-map index 863f6df7adb71..c5ab93bd02164 100644 --- a/tests/coverage/iffy/uses_inline_crate.cov-map +++ b/tests/coverage/iffy/uses_inline_crate.cov-map @@ -1,84 +1,87 @@ Function name: used_inline_crate::used_from_bin_crate_and_lib_crate_generic_function::> -Raw bytes (19): 0x[01, 01, 00, 03, 01, 2c, 01, 00, 4c, 01, 01, 05, 00, 0d, 01, 01, 01, 00, 02] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 2c, 01, 00, 4c, 01, 01, 05, 00, 0d, 01, 00, 48, 00, 4b, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/auxiliary/used_inline_crate.rs Number of expressions: 0 -Number of file 0 mappings: 3 +Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 44, 1) to (start + 0, 76) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 72) to (start + 0, 75) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: used_inline_crate::used_inline_function -Raw bytes (56): 0x[01, 01, 01, 01, 05, 0a, 01, 14, 01, 00, 1e, 01, 04, 09, 00, 10, 01, 00, 13, 00, 2e, 01, 01, 09, 00, 16, 01, 00, 19, 00, 1a, 01, 01, 08, 00, 0f, 05, 00, 10, 02, 06, 02, 02, 05, 00, 06, 01, 01, 05, 00, 17, 01, 01, 01, 00, 02] +Raw bytes (46): 0x[01, 01, 01, 01, 05, 08, 01, 14, 01, 00, 1e, 01, 04, 13, 00, 2e, 01, 01, 19, 00, 1a, 01, 01, 08, 00, 0f, 05, 01, 09, 00, 17, 02, 01, 05, 00, 06, 01, 01, 05, 00, 19, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/auxiliary/used_inline_crate.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 10 +Number of file 0 mappings: 8 - Code(Counter(0)) at (prev + 20, 1) to (start + 0, 30) -- Code(Counter(0)) at (prev + 4, 9) to (start + 0, 16) -- Code(Counter(0)) at (prev + 0, 19) to (start + 0, 46) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 22) -- Code(Counter(0)) at (prev + 0, 25) to (start + 0, 26) +- Code(Counter(0)) at (prev + 4, 19) to (start + 0, 46) +- Code(Counter(0)) at (prev + 1, 25) to (start + 0, 26) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 15) -- Code(Counter(1)) at (prev + 0, 16) to (start + 2, 6) -- Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 6) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 23) +- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 6) = (c0 - c1) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 23) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 25) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c1 Function name: used_inline_crate::used_only_from_bin_crate_generic_function::<&alloc::vec::Vec> -Raw bytes (19): 0x[01, 01, 00, 03, 01, 21, 01, 00, 43, 01, 01, 05, 00, 0d, 01, 01, 01, 00, 02] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 21, 01, 00, 43, 01, 01, 05, 00, 0d, 01, 00, 3f, 00, 42, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/auxiliary/used_inline_crate.rs Number of expressions: 0 -Number of file 0 mappings: 3 +Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 33, 1) to (start + 0, 67) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 63) to (start + 0, 66) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: used_inline_crate::used_only_from_bin_crate_generic_function::<&str> -Raw bytes (19): 0x[01, 01, 00, 03, 01, 21, 01, 00, 43, 01, 01, 05, 00, 0d, 01, 01, 01, 00, 02] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 21, 01, 00, 43, 01, 01, 05, 00, 0d, 01, 00, 3f, 00, 42, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/auxiliary/used_inline_crate.rs Number of expressions: 0 -Number of file 0 mappings: 3 +Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 33, 1) to (start + 0, 67) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 63) to (start + 0, 66) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: used_inline_crate::used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str> -Raw bytes (19): 0x[01, 01, 00, 03, 01, 31, 01, 00, 5b, 01, 01, 05, 00, 0d, 01, 01, 01, 00, 02] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 31, 01, 00, 5b, 01, 01, 05, 00, 0d, 01, 00, 57, 00, 5a, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/auxiliary/used_inline_crate.rs Number of expressions: 0 -Number of file 0 mappings: 3 +Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 49, 1) to (start + 0, 91) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 87) to (start + 0, 90) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: uses_inline_crate::main -Raw bytes (64): 0x[01, 02, 00, 0c, 01, 0c, 01, 00, 0a, 01, 01, 05, 00, 25, 01, 01, 05, 00, 2c, 01, 01, 09, 00, 11, 01, 00, 14, 00, 18, 01, 01, 05, 00, 41, 01, 00, 42, 00, 4b, 01, 01, 05, 00, 41, 01, 01, 05, 00, 4a, 01, 00, 4b, 00, 53, 01, 01, 05, 00, 59, 01, 03, 01, 00, 02] +Raw bytes (69): 0x[01, 02, 00, 0d, 01, 0c, 01, 00, 0a, 01, 01, 05, 00, 27, 01, 01, 05, 00, 2e, 01, 01, 14, 00, 18, 01, 00, 19, 00, 1a, 01, 00, 1c, 00, 1d, 01, 00, 1f, 00, 20, 01, 00, 22, 00, 23, 01, 01, 05, 00, 4c, 01, 01, 05, 00, 60, 01, 01, 05, 00, 54, 01, 01, 05, 02, 06, 01, 03, 01, 00, 02] Number of files: 1 - file 0 => $DIR/uses_inline_crate.rs Number of expressions: 0 -Number of file 0 mappings: 12 +Number of file 0 mappings: 13 - Code(Counter(0)) at (prev + 12, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 37) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 44) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 17) -- Code(Counter(0)) at (prev + 0, 20) to (start + 0, 24) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 65) -- Code(Counter(0)) at (prev + 0, 66) to (start + 0, 75) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 65) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 74) -- Code(Counter(0)) at (prev + 0, 75) to (start + 0, 83) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 89) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 39) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 46) +- Code(Counter(0)) at (prev + 1, 20) to (start + 0, 24) +- Code(Counter(0)) at (prev + 0, 25) to (start + 0, 26) +- Code(Counter(0)) at (prev + 0, 28) to (start + 0, 29) +- Code(Counter(0)) at (prev + 0, 31) to (start + 0, 32) +- Code(Counter(0)) at (prev + 0, 34) to (start + 0, 35) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 76) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 96) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 84) +- Code(Counter(0)) at (prev + 1, 5) to (start + 2, 6) - Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/iffy/uses_inline_crate.coverage b/tests/coverage/iffy/uses_inline_crate.coverage index 15084bcf7ea98..898d953ebc836 100644 --- a/tests/coverage/iffy/uses_inline_crate.coverage +++ b/tests/coverage/iffy/uses_inline_crate.coverage @@ -13,8 +13,7 @@ $DIR/auxiliary/used_inline_crate.rs: LL| 1| let mut countdown = 0; LL| 1| if is_true { LL| 1| countdown = 10; - LL| 1| } - ^0 + LL| 0| } LL| 1| use_this_lib_crate(); LL| 1|} LL| | @@ -27,8 +26,7 @@ $DIR/auxiliary/used_inline_crate.rs: LL| 1| let mut countdown = 0; LL| 1| if is_true { LL| 1| countdown = 10; - LL| 1| } - ^0 + LL| 0| } LL| 1| use_this_lib_crate(); LL| 1|} LL| | @@ -126,8 +124,8 @@ $DIR/auxiliary/used_inline_crate.rs: LL| 2|fn use_this_lib_crate() { LL| 2| used_from_bin_crate_and_lib_crate_generic_function("used from library used_crate.rs"); LL| 2| used_with_same_type_from_bin_crate_and_lib_crate_generic_function( - LL| | "used from library used_crate.rs", - LL| | ); + LL| 2| "used from library used_crate.rs", + LL| 2| ); LL| 2| let some_vec = vec![5, 6, 7, 8]; LL| 2| used_only_from_this_lib_crate_generic_function(some_vec); LL| 2| used_only_from_this_lib_crate_generic_function("used ONLY from library used_crate.rs"); @@ -153,7 +151,7 @@ $DIR/uses_inline_crate.rs: LL| 1| used_inline_crate::used_only_from_bin_crate_generic_function("used from bin uses_crate.rs"); LL| 1| used_inline_crate::used_from_bin_crate_and_lib_crate_generic_function(some_vec); LL| 1| used_inline_crate::used_with_same_type_from_bin_crate_and_lib_crate_generic_function( - LL| | "interesting?", - LL| | ); + LL| 1| "interesting?", + LL| 1| ); LL| 1|} diff --git a/tests/coverage/iffy/while.cov-map b/tests/coverage/iffy/while.cov-map index c4183e18e021d..f09e1ea78d236 100644 --- a/tests/coverage/iffy/while.cov-map +++ b/tests/coverage/iffy/while.cov-map @@ -1,12 +1,11 @@ Function name: while::main -Raw bytes (34): 0x[01, 01, 00, 06, 01, 01, 01, 00, 0a, 01, 01, 09, 00, 0c, 01, 00, 0f, 00, 10, 01, 01, 0b, 00, 14, 00, 00, 15, 02, 06, 01, 03, 01, 00, 02] +Raw bytes (29): 0x[01, 01, 00, 05, 01, 01, 01, 00, 0a, 01, 01, 0f, 00, 10, 01, 01, 0b, 00, 14, 00, 00, 15, 02, 06, 01, 03, 01, 00, 02] Number of files: 1 - file 0 => $DIR/while.rs Number of expressions: 0 -Number of file 0 mappings: 6 +Number of file 0 mappings: 5 - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 12) -- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 16) +- Code(Counter(0)) at (prev + 1, 15) to (start + 0, 16) - Code(Counter(0)) at (prev + 1, 11) to (start + 0, 20) - Code(Zero) at (prev + 0, 21) to (start + 2, 6) - Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2) diff --git a/tests/coverage/iffy/while_early_ret.cov-map b/tests/coverage/iffy/while_early_ret.cov-map index b29b5d40c4df8..42f8ac118b4f9 100644 --- a/tests/coverage/iffy/while_early_ret.cov-map +++ b/tests/coverage/iffy/while_early_ret.cov-map @@ -1,5 +1,5 @@ Function name: while_early_ret::main -Raw bytes (80): 0x[01, 01, 08, 0f, 05, 01, 09, 0f, 13, 01, 09, 05, 0d, 05, 01, 05, 01, 05, 09, 0c, 01, 05, 01, 00, 1c, 01, 01, 09, 00, 16, 01, 00, 19, 00, 1b, 05, 02, 09, 02, 0a, 09, 05, 0d, 02, 0e, 02, 06, 15, 02, 16, 0d, 04, 15, 00, 1b, 0a, 04, 15, 00, 1b, 1a, 03, 09, 00, 0a, 1a, 01, 09, 02, 0a, 1e, 05, 05, 00, 0b, 01, 01, 01, 00, 02] +Raw bytes (75): 0x[01, 01, 08, 0f, 05, 01, 09, 0f, 13, 01, 09, 05, 0d, 05, 01, 05, 01, 05, 09, 0b, 01, 05, 01, 00, 1c, 01, 01, 19, 00, 1b, 05, 02, 09, 02, 0a, 09, 05, 0d, 02, 0e, 02, 06, 15, 02, 16, 0d, 04, 15, 00, 1b, 0a, 04, 15, 00, 1b, 1a, 03, 09, 00, 0a, 1a, 01, 09, 02, 0a, 1e, 05, 05, 00, 0b, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/while_early_ret.rs Number of expressions: 8 @@ -11,10 +11,9 @@ Number of expressions: 8 - expression 5 operands: lhs = Counter(1), rhs = Counter(0) - expression 6 operands: lhs = Counter(1), rhs = Counter(0) - expression 7 operands: lhs = Counter(1), rhs = Counter(2) -Number of file 0 mappings: 12 +Number of file 0 mappings: 11 - Code(Counter(0)) at (prev + 5, 1) to (start + 0, 28) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 22) -- Code(Counter(0)) at (prev + 0, 25) to (start + 0, 27) +- Code(Counter(0)) at (prev + 1, 25) to (start + 0, 27) - Code(Counter(1)) at (prev + 2, 9) to (start + 2, 10) - Code(Counter(2)) at (prev + 5, 13) to (start + 2, 14) - Code(Expression(0, Sub)) at (prev + 6, 21) to (start + 2, 22) diff --git a/tests/coverage/iffy/yield.cov-map b/tests/coverage/iffy/yield.cov-map index 8c1da30c08b6c..ceb96ab62305e 100644 --- a/tests/coverage/iffy/yield.cov-map +++ b/tests/coverage/iffy/yield.cov-map @@ -1,60 +1,49 @@ Function name: yield::main -Raw bytes (139): 0x[01, 01, 05, 01, 05, 05, 09, 09, 11, 11, 15, 11, 15, 19, 01, 08, 01, 00, 0a, 01, 01, 09, 00, 16, 01, 06, 0b, 00, 2e, 01, 00, 0b, 00, 13, 01, 00, 14, 00, 22, 05, 01, 27, 00, 29, 02, 01, 0e, 00, 14, 05, 02, 0b, 00, 2e, 05, 00, 0b, 00, 13, 05, 00, 14, 00, 22, 0d, 01, 22, 00, 27, 09, 00, 2c, 00, 2e, 06, 01, 0e, 00, 14, 09, 03, 09, 00, 16, 09, 08, 0b, 00, 2e, 09, 00, 0b, 00, 13, 09, 00, 14, 00, 22, 11, 01, 27, 00, 29, 0a, 01, 0e, 00, 14, 11, 02, 0b, 00, 2e, 11, 00, 0b, 00, 13, 11, 00, 14, 00, 22, 12, 01, 27, 00, 29, 15, 01, 0e, 00, 14, 12, 02, 01, 00, 02] +Raw bytes (84): 0x[01, 01, 05, 01, 05, 05, 09, 09, 0d, 0d, 11, 0d, 11, 0e, 01, 08, 01, 00, 0a, 01, 07, 0b, 00, 2e, 05, 01, 27, 00, 29, 02, 01, 0e, 00, 14, 05, 02, 0b, 00, 2e, 09, 01, 2c, 00, 2e, 06, 01, 0e, 00, 14, 09, 0b, 0b, 00, 2e, 0d, 01, 27, 00, 29, 0a, 01, 0e, 00, 14, 0d, 02, 0b, 00, 2e, 12, 01, 27, 00, 29, 11, 01, 0e, 00, 14, 12, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/yield.rs Number of expressions: 5 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) - expression 1 operands: lhs = Counter(1), rhs = Counter(2) -- expression 2 operands: lhs = Counter(2), rhs = Counter(4) -- expression 3 operands: lhs = Counter(4), rhs = Counter(5) -- expression 4 operands: lhs = Counter(4), rhs = Counter(5) -Number of file 0 mappings: 25 +- expression 2 operands: lhs = Counter(2), rhs = Counter(3) +- expression 3 operands: lhs = Counter(3), rhs = Counter(4) +- expression 4 operands: lhs = Counter(3), rhs = Counter(4) +Number of file 0 mappings: 14 - Code(Counter(0)) at (prev + 8, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 22) -- Code(Counter(0)) at (prev + 6, 11) to (start + 0, 46) -- Code(Counter(0)) at (prev + 0, 11) to (start + 0, 19) -- Code(Counter(0)) at (prev + 0, 20) to (start + 0, 34) +- Code(Counter(0)) at (prev + 7, 11) to (start + 0, 46) - Code(Counter(1)) at (prev + 1, 39) to (start + 0, 41) - Code(Expression(0, Sub)) at (prev + 1, 14) to (start + 0, 20) = (c0 - c1) - Code(Counter(1)) at (prev + 2, 11) to (start + 0, 46) -- Code(Counter(1)) at (prev + 0, 11) to (start + 0, 19) -- Code(Counter(1)) at (prev + 0, 20) to (start + 0, 34) -- Code(Counter(3)) at (prev + 1, 34) to (start + 0, 39) -- Code(Counter(2)) at (prev + 0, 44) to (start + 0, 46) +- Code(Counter(2)) at (prev + 1, 44) to (start + 0, 46) - Code(Expression(1, Sub)) at (prev + 1, 14) to (start + 0, 20) = (c1 - c2) -- Code(Counter(2)) at (prev + 3, 9) to (start + 0, 22) -- Code(Counter(2)) at (prev + 8, 11) to (start + 0, 46) -- Code(Counter(2)) at (prev + 0, 11) to (start + 0, 19) -- Code(Counter(2)) at (prev + 0, 20) to (start + 0, 34) -- Code(Counter(4)) at (prev + 1, 39) to (start + 0, 41) +- Code(Counter(2)) at (prev + 11, 11) to (start + 0, 46) +- Code(Counter(3)) at (prev + 1, 39) to (start + 0, 41) - Code(Expression(2, Sub)) at (prev + 1, 14) to (start + 0, 20) - = (c2 - c4) -- Code(Counter(4)) at (prev + 2, 11) to (start + 0, 46) -- Code(Counter(4)) at (prev + 0, 11) to (start + 0, 19) -- Code(Counter(4)) at (prev + 0, 20) to (start + 0, 34) + = (c2 - c3) +- Code(Counter(3)) at (prev + 2, 11) to (start + 0, 46) - Code(Expression(4, Sub)) at (prev + 1, 39) to (start + 0, 41) - = (c4 - c5) -- Code(Counter(5)) at (prev + 1, 14) to (start + 0, 20) + = (c3 - c4) +- Code(Counter(4)) at (prev + 1, 14) to (start + 0, 20) - Code(Expression(4, Sub)) at (prev + 2, 1) to (start + 0, 2) - = (c4 - c5) -Highest counter ID seen: c5 + = (c3 - c4) +Highest counter ID seen: c4 Function name: yield::main::{closure#0} -Raw bytes (24): 0x[01, 01, 00, 04, 01, 0a, 08, 00, 09, 01, 01, 09, 00, 10, 05, 01, 10, 00, 15, 05, 01, 05, 00, 06] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 0a, 08, 00, 09, 01, 01, 09, 00, 10, 05, 01, 09, 00, 15, 05, 01, 05, 00, 06] Number of files: 1 - file 0 => $DIR/yield.rs Number of expressions: 0 Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 10, 8) to (start + 0, 9) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 16) -- Code(Counter(1)) at (prev + 1, 16) to (start + 0, 21) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 21) - Code(Counter(1)) at (prev + 1, 5) to (start + 0, 6) Highest counter ID seen: c1 Function name: yield::main::{closure#1} -Raw bytes (34): 0x[01, 01, 00, 06, 01, 19, 08, 00, 09, 01, 01, 09, 00, 10, 05, 01, 09, 00, 10, 09, 01, 09, 00, 10, 0d, 01, 10, 00, 15, 0d, 01, 05, 00, 06] +Raw bytes (34): 0x[01, 01, 00, 06, 01, 19, 08, 00, 09, 01, 01, 09, 00, 10, 05, 01, 09, 00, 10, 09, 01, 09, 00, 10, 0d, 01, 09, 00, 15, 0d, 01, 05, 00, 06] Number of files: 1 - file 0 => $DIR/yield.rs Number of expressions: 0 @@ -63,7 +52,7 @@ Number of file 0 mappings: 6 - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 16) - Code(Counter(1)) at (prev + 1, 9) to (start + 0, 16) - Code(Counter(2)) at (prev + 1, 9) to (start + 0, 16) -- Code(Counter(3)) at (prev + 1, 16) to (start + 0, 21) +- Code(Counter(3)) at (prev + 1, 9) to (start + 0, 21) - Code(Counter(3)) at (prev + 1, 5) to (start + 0, 6) Highest counter ID seen: c3 diff --git a/tests/coverage/iffy/yield.coverage b/tests/coverage/iffy/yield.coverage index 2fea2d94dae4b..47cedc62184b7 100644 --- a/tests/coverage/iffy/yield.coverage +++ b/tests/coverage/iffy/yield.coverage @@ -6,7 +6,7 @@ LL| |use std::pin::Pin; LL| | LL| 1|fn main() { - LL| 1| let mut coroutine = #[coroutine] + LL| | let mut coroutine = #[coroutine] LL| 1| || { LL| 1| yield 1; LL| 1| return "foo"; @@ -21,7 +21,7 @@ LL| 0| _ => panic!("unexpected value from resume"), LL| | } LL| | - LL| 1| let mut coroutine = #[coroutine] + LL| | let mut coroutine = #[coroutine] LL| 1| || { LL| 1| yield 1; LL| 1| yield 2; diff --git a/tests/coverage/let-else.none.cov-map b/tests/coverage/let-else.none.cov-map index af5b34cb36f79..e89c179568610 100644 --- a/tests/coverage/let-else.none.cov-map +++ b/tests/coverage/let-else.none.cov-map @@ -1,37 +1,29 @@ Function name: let_else::let_else_no_semi -Raw bytes (41): 0x[01, 01, 01, 01, 05, 07, 01, 10, 01, 00, 2b, 02, 01, 0e, 00, 11, 01, 00, 15, 00, 1c, 05, 01, 09, 00, 0f, 02, 02, 05, 00, 08, 02, 00, 09, 00, 0c, 01, 01, 01, 00, 02] +Raw bytes (31): 0x[01, 01, 01, 01, 05, 05, 01, 10, 01, 00, 2b, 01, 01, 15, 00, 1c, 05, 01, 09, 00, 0f, 02, 02, 05, 00, 0d, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/let-else.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 7 +Number of file 0 mappings: 5 - Code(Counter(0)) at (prev + 16, 1) to (start + 0, 43) -- Code(Expression(0, Sub)) at (prev + 1, 14) to (start + 0, 17) - = (c0 - c1) -- Code(Counter(0)) at (prev + 0, 21) to (start + 0, 28) +- Code(Counter(0)) at (prev + 1, 21) to (start + 0, 28) - Code(Counter(1)) at (prev + 1, 9) to (start + 0, 15) -- Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 8) - = (c0 - c1) -- Code(Expression(0, Sub)) at (prev + 0, 9) to (start + 0, 12) +- Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 13) = (c0 - c1) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c1 Function name: let_else::let_else_semi -Raw bytes (41): 0x[01, 01, 01, 01, 05, 07, 01, 08, 01, 00, 28, 02, 01, 0e, 00, 11, 01, 00, 15, 00, 1c, 05, 01, 09, 00, 0f, 02, 02, 05, 00, 08, 02, 00, 09, 00, 0c, 01, 01, 01, 00, 02] +Raw bytes (31): 0x[01, 01, 01, 01, 05, 05, 01, 08, 01, 00, 28, 01, 01, 15, 00, 1c, 05, 01, 09, 00, 0f, 02, 02, 05, 00, 0d, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/let-else.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 7 +Number of file 0 mappings: 5 - Code(Counter(0)) at (prev + 8, 1) to (start + 0, 40) -- Code(Expression(0, Sub)) at (prev + 1, 14) to (start + 0, 17) - = (c0 - c1) -- Code(Counter(0)) at (prev + 0, 21) to (start + 0, 28) +- Code(Counter(0)) at (prev + 1, 21) to (start + 0, 28) - Code(Counter(1)) at (prev + 1, 9) to (start + 0, 15) -- Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 8) - = (c0 - c1) -- Code(Expression(0, Sub)) at (prev + 0, 9) to (start + 0, 12) +- Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 13) = (c0 - c1) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c1 diff --git a/tests/coverage/let-else.none.coverage b/tests/coverage/let-else.none.coverage index a24877eb90a03..53c62cf29338e 100644 --- a/tests/coverage/let-else.none.coverage +++ b/tests/coverage/let-else.none.coverage @@ -7,7 +7,6 @@ LL| | LL| 1|fn let_else_semi(opt_msg: Option<&str>) { LL| 1| let Some(msg) = opt_msg else { - ^0 LL| 1| return; LL| | }; LL| 0| say(msg); @@ -16,7 +15,6 @@ LL| |#[rustfmt::skip] LL| 1|fn let_else_no_semi(opt_msg: Option<&str>) { LL| 1| let Some(msg) = opt_msg else { - ^0 LL| 1| return LL| | }; LL| 0| say(msg); diff --git a/tests/coverage/let_else_loop.cov-map b/tests/coverage/let_else_loop.cov-map index 169d4a5c0961e..be7b79c22c2cd 100644 --- a/tests/coverage/let_else_loop.cov-map +++ b/tests/coverage/let_else_loop.cov-map @@ -23,14 +23,16 @@ Number of file 0 mappings: 4 Highest counter ID seen: (none) Function name: let_else_loop::loopy -Raw bytes (24): 0x[01, 01, 00, 04, 01, 09, 01, 00, 15, 01, 01, 10, 00, 14, 09, 00, 1c, 00, 23, 05, 01, 01, 00, 02] +Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 09, 01, 00, 15, 01, 01, 10, 00, 14, 05, 00, 1c, 00, 23, 02, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/let_else_loop.rs -Number of expressions: 0 +Number of expressions: 1 +- expression 0 operands: lhs = Counter(0), rhs = Counter(1) Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 9, 1) to (start + 0, 21) - Code(Counter(0)) at (prev + 1, 16) to (start + 0, 20) -- Code(Counter(2)) at (prev + 0, 28) to (start + 0, 35) -- Code(Counter(1)) at (prev + 1, 1) to (start + 0, 2) -Highest counter ID seen: c2 +- Code(Counter(1)) at (prev + 0, 28) to (start + 0, 35) +- Code(Expression(0, Sub)) at (prev + 1, 1) to (start + 0, 2) + = (c0 - c1) +Highest counter ID seen: c1 diff --git a/tests/coverage/long_and_wide.cov-map b/tests/coverage/long_and_wide.cov-map index 93466a98eaf35..bd186a72f5532 100644 --- a/tests/coverage/long_and_wide.cov-map +++ b/tests/coverage/long_and_wide.cov-map @@ -19,15 +19,15 @@ Number of file 0 mappings: 2 Highest counter ID seen: c0 Function name: long_and_wide::main -Raw bytes (29): 0x[01, 01, 00, 05, 01, 07, 01, 00, 0a, 01, 01, 05, 00, 12, 01, 01, 05, 00, 12, 01, 01, 05, 00, 11, 01, 01, 01, 00, 02] +Raw bytes (29): 0x[01, 01, 00, 05, 01, 07, 01, 00, 0a, 01, 01, 05, 00, 14, 01, 01, 05, 00, 14, 01, 01, 05, 00, 13, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/long_and_wide.rs Number of expressions: 0 Number of file 0 mappings: 5 - Code(Counter(0)) at (prev + 7, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 18) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 18) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 17) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 20) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 20) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 19) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/loop-break.cov-map b/tests/coverage/loop-break.cov-map index 3981623550dda..32105ef53d27c 100644 --- a/tests/coverage/loop-break.cov-map +++ b/tests/coverage/loop-break.cov-map @@ -1,12 +1,12 @@ Function name: loop_break::main -Raw bytes (31): 0x[01, 01, 01, 05, 01, 05, 01, 03, 01, 00, 0a, 05, 02, 0c, 00, 21, 01, 01, 0d, 00, 12, 02, 01, 09, 00, 0a, 01, 02, 01, 00, 02] +Raw bytes (31): 0x[01, 01, 01, 05, 01, 05, 01, 03, 01, 00, 0a, 05, 02, 0c, 00, 27, 01, 01, 0d, 00, 12, 02, 01, 09, 00, 0a, 01, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/loop-break.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(1), rhs = Counter(0) Number of file 0 mappings: 5 - Code(Counter(0)) at (prev + 3, 1) to (start + 0, 10) -- Code(Counter(1)) at (prev + 2, 12) to (start + 0, 33) +- Code(Counter(1)) at (prev + 2, 12) to (start + 0, 39) - Code(Counter(0)) at (prev + 1, 13) to (start + 0, 18) - Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 10) = (c1 - c0) diff --git a/tests/coverage/loop_break_value.cov-map b/tests/coverage/loop_break_value.cov-map index cf355eceb2c17..c9a5cfaa9150a 100644 --- a/tests/coverage/loop_break_value.cov-map +++ b/tests/coverage/loop_break_value.cov-map @@ -1,12 +1,11 @@ Function name: loop_break_value::main -Raw bytes (24): 0x[01, 01, 00, 04, 01, 04, 01, 00, 0a, 01, 01, 09, 00, 0f, 01, 02, 0d, 05, 0a, 01, 07, 01, 00, 02] +Raw bytes (19): 0x[01, 01, 00, 03, 01, 04, 01, 00, 0a, 01, 03, 0d, 05, 0a, 01, 07, 01, 00, 02] Number of files: 1 - file 0 => $DIR/loop_break_value.rs Number of expressions: 0 -Number of file 0 mappings: 4 +Number of file 0 mappings: 3 - Code(Counter(0)) at (prev + 4, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 15) -- Code(Counter(0)) at (prev + 2, 13) to (start + 5, 10) +- Code(Counter(0)) at (prev + 3, 13) to (start + 5, 10) - Code(Counter(0)) at (prev + 7, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/loop_break_value.coverage b/tests/coverage/loop_break_value.coverage index 5e80168b958b1..b6aa433417196 100644 --- a/tests/coverage/loop_break_value.coverage +++ b/tests/coverage/loop_break_value.coverage @@ -2,7 +2,7 @@ LL| | LL| |#[rustfmt::skip] LL| 1|fn main() { - LL| 1| let result + LL| | let result LL| | = LL| 1| loop LL| 1| { diff --git a/tests/coverage/macro_in_closure.cov-map b/tests/coverage/macro_in_closure.cov-map index 1a3960196acd6..3529d0c4c321b 100644 --- a/tests/coverage/macro_in_closure.cov-map +++ b/tests/coverage/macro_in_closure.cov-map @@ -1,20 +1,22 @@ Function name: macro_in_closure::NO_BLOCK::{closure#0} -Raw bytes (9): 0x[01, 01, 00, 01, 01, 07, 1c, 00, 24] +Raw bytes (14): 0x[01, 01, 00, 02, 01, 07, 1c, 00, 24, 01, 00, 25, 00, 2c] Number of files: 1 - file 0 => $DIR/macro_in_closure.rs Number of expressions: 0 -Number of file 0 mappings: 1 +Number of file 0 mappings: 2 - Code(Counter(0)) at (prev + 7, 28) to (start + 0, 36) +- Code(Counter(0)) at (prev + 0, 37) to (start + 0, 44) Highest counter ID seen: c0 Function name: macro_in_closure::WITH_BLOCK::{closure#0} -Raw bytes (19): 0x[01, 01, 00, 03, 01, 09, 1e, 00, 1f, 01, 01, 05, 00, 0d, 01, 01, 01, 00, 02] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 09, 1e, 00, 1f, 01, 01, 05, 00, 0d, 01, 00, 0e, 00, 15, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/macro_in_closure.rs Number of expressions: 0 -Number of file 0 mappings: 3 +Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 9, 30) to (start + 0, 31) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 21) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/macro_name_span.cov-map b/tests/coverage/macro_name_span.cov-map index c96cb75846b26..2206f286112b7 100644 --- a/tests/coverage/macro_name_span.cov-map +++ b/tests/coverage/macro_name_span.cov-map @@ -9,13 +9,13 @@ Number of file 0 mappings: 2 Highest counter ID seen: c0 Function name: macro_name_span::main -Raw bytes (19): 0x[01, 01, 00, 03, 01, 0b, 01, 00, 0a, 01, 01, 05, 00, 16, 01, 01, 01, 00, 02] +Raw bytes (19): 0x[01, 01, 00, 03, 01, 0b, 01, 00, 0a, 01, 01, 05, 00, 18, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/macro_name_span.rs Number of expressions: 0 Number of file 0 mappings: 3 - Code(Counter(0)) at (prev + 11, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 22) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 24) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/macros/call-site-body.cov-map b/tests/coverage/macros/call-site-body.cov-map index 89d1eb3a84108..c21f583eae228 100644 --- a/tests/coverage/macros/call-site-body.cov-map +++ b/tests/coverage/macros/call-site-body.cov-map @@ -1,12 +1,11 @@ Function name: call_site_body::fn_with_call_site_body -Raw bytes (19): 0x[01, 01, 00, 03, 01, 15, 05, 00, 06, 01, 01, 09, 00, 0c, 01, 00, 0d, 00, 14] +Raw bytes (14): 0x[01, 01, 00, 02, 01, 15, 05, 00, 06, 01, 01, 09, 00, 15] Number of files: 1 - file 0 => $DIR/call-site-body.rs Number of expressions: 0 -Number of file 0 mappings: 3 +Number of file 0 mappings: 2 - Code(Counter(0)) at (prev + 21, 5) to (start + 0, 6) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 12) -- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 20) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 21) Highest counter ID seen: c0 Function name: call_site_body::fn_with_call_site_inner (unused) diff --git a/tests/coverage/macros/pass-through.cov-map b/tests/coverage/macros/pass-through.cov-map index 83937e4fb8b76..cf8223dacd9bd 100644 --- a/tests/coverage/macros/pass-through.cov-map +++ b/tests/coverage/macros/pass-through.cov-map @@ -1,55 +1,49 @@ Function name: pass_through::uses_inner_macro -Raw bytes (51): 0x[01, 01, 01, 01, 05, 09, 01, 24, 01, 00, 16, 01, 01, 08, 00, 1d, 05, 01, 09, 00, 0c, 05, 00, 0d, 00, 21, 05, 01, 09, 00, 15, 05, 01, 09, 00, 0c, 05, 00, 0d, 00, 20, 02, 01, 05, 00, 06, 01, 01, 01, 00, 02] +Raw bytes (41): 0x[01, 01, 01, 01, 05, 07, 01, 24, 01, 00, 16, 01, 01, 08, 00, 23, 05, 01, 09, 00, 22, 05, 01, 09, 00, 15, 05, 01, 09, 00, 21, 02, 01, 05, 00, 06, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/pass-through.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 9 +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 36, 1) to (start + 0, 22) -- Code(Counter(0)) at (prev + 1, 8) to (start + 0, 29) -- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 12) -- Code(Counter(1)) at (prev + 0, 13) to (start + 0, 33) +- Code(Counter(0)) at (prev + 1, 8) to (start + 0, 35) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 34) - Code(Counter(1)) at (prev + 1, 9) to (start + 0, 21) -- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 12) -- Code(Counter(1)) at (prev + 0, 13) to (start + 0, 32) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 33) - Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 6) = (c0 - c1) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c1 Function name: pass_through::uses_middle_macro -Raw bytes (51): 0x[01, 01, 01, 01, 05, 09, 01, 2c, 01, 00, 17, 01, 01, 08, 00, 1d, 05, 01, 09, 00, 0c, 05, 00, 0d, 00, 22, 05, 01, 09, 00, 16, 05, 01, 09, 00, 0c, 05, 00, 0d, 00, 21, 02, 01, 05, 00, 06, 01, 01, 01, 00, 02] +Raw bytes (41): 0x[01, 01, 01, 01, 05, 07, 01, 2c, 01, 00, 17, 01, 01, 08, 00, 23, 05, 01, 09, 00, 23, 05, 01, 09, 00, 16, 05, 01, 09, 00, 22, 02, 01, 05, 00, 06, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/pass-through.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 9 +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 44, 1) to (start + 0, 23) -- Code(Counter(0)) at (prev + 1, 8) to (start + 0, 29) -- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 12) -- Code(Counter(1)) at (prev + 0, 13) to (start + 0, 34) +- Code(Counter(0)) at (prev + 1, 8) to (start + 0, 35) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 35) - Code(Counter(1)) at (prev + 1, 9) to (start + 0, 22) -- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 12) -- Code(Counter(1)) at (prev + 0, 13) to (start + 0, 33) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 34) - Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 6) = (c0 - c1) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c1 Function name: pass_through::uses_outer_macro -Raw bytes (51): 0x[01, 01, 01, 01, 05, 09, 01, 34, 01, 00, 16, 01, 01, 08, 00, 1d, 05, 01, 09, 00, 0c, 05, 00, 0d, 00, 21, 05, 01, 09, 00, 15, 05, 01, 09, 00, 0c, 05, 00, 0d, 00, 20, 02, 01, 05, 00, 06, 01, 01, 01, 00, 02] +Raw bytes (41): 0x[01, 01, 01, 01, 05, 07, 01, 34, 01, 00, 16, 01, 01, 08, 00, 23, 05, 01, 09, 00, 22, 05, 01, 09, 00, 15, 05, 01, 09, 00, 21, 02, 01, 05, 00, 06, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/pass-through.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 9 +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 52, 1) to (start + 0, 22) -- Code(Counter(0)) at (prev + 1, 8) to (start + 0, 29) -- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 12) -- Code(Counter(1)) at (prev + 0, 13) to (start + 0, 33) +- Code(Counter(0)) at (prev + 1, 8) to (start + 0, 35) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 34) - Code(Counter(1)) at (prev + 1, 9) to (start + 0, 21) -- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 12) -- Code(Counter(1)) at (prev + 0, 13) to (start + 0, 32) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 33) - Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 6) = (c0 - c1) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) diff --git a/tests/coverage/match.cov-map b/tests/coverage/match.cov-map index ac9433fda2dcb..154f10d150724 100644 --- a/tests/coverage/match.cov-map +++ b/tests/coverage/match.cov-map @@ -1,48 +1,31 @@ Function name: match::match_expr -Raw bytes (131): 0x[01, 01, 0b, 1d, 07, 0b, 19, 0f, 15, 05, 0d, 0d, 11, 0d, 11, 05, 09, 05, 09, 05, 09, 01, 1d, 01, 1d, 15, 01, 06, 01, 00, 2a, 0d, 01, 0b, 00, 0c, 02, 01, 14, 00, 17, 02, 00, 18, 00, 1e, 19, 03, 0d, 00, 10, 19, 00, 11, 00, 16, 15, 02, 14, 02, 0a, 11, 03, 17, 00, 18, 11, 00, 1c, 02, 0a, 16, 03, 14, 00, 17, 16, 00, 18, 00, 1f, 09, 01, 0e, 00, 13, 05, 00, 18, 00, 1d, 09, 00, 21, 00, 22, 09, 00, 26, 02, 0a, 22, 03, 0e, 00, 13, 22, 00, 18, 00, 1b, 22, 00, 1c, 00, 23, 2a, 01, 11, 00, 14, 2a, 00, 15, 00, 1b, 01, 02, 01, 00, 02] +Raw bytes (83): 0x[01, 01, 07, 1d, 07, 0b, 19, 0f, 15, 05, 0d, 0d, 11, 05, 09, 01, 1d, 0d, 01, 06, 01, 00, 2a, 01, 01, 0b, 00, 0c, 02, 01, 14, 00, 1f, 19, 03, 0d, 00, 17, 15, 03, 0d, 00, 17, 0d, 02, 14, 00, 18, 11, 01, 0d, 00, 1e, 12, 02, 14, 00, 20, 05, 01, 18, 00, 22, 09, 01, 0d, 00, 18, 16, 02, 18, 00, 24, 1a, 01, 11, 00, 1c, 01, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/match.rs -Number of expressions: 11 +Number of expressions: 7 - expression 0 operands: lhs = Counter(7), rhs = Expression(1, Add) - expression 1 operands: lhs = Expression(2, Add), rhs = Counter(6) - expression 2 operands: lhs = Expression(3, Add), rhs = Counter(5) - expression 3 operands: lhs = Counter(1), rhs = Counter(3) - expression 4 operands: lhs = Counter(3), rhs = Counter(4) -- expression 5 operands: lhs = Counter(3), rhs = Counter(4) -- expression 6 operands: lhs = Counter(1), rhs = Counter(2) -- expression 7 operands: lhs = Counter(1), rhs = Counter(2) -- expression 8 operands: lhs = Counter(1), rhs = Counter(2) -- expression 9 operands: lhs = Counter(0), rhs = Counter(7) -- expression 10 operands: lhs = Counter(0), rhs = Counter(7) -Number of file 0 mappings: 21 +- expression 5 operands: lhs = Counter(1), rhs = Counter(2) +- expression 6 operands: lhs = Counter(0), rhs = Counter(7) +Number of file 0 mappings: 13 - Code(Counter(0)) at (prev + 6, 1) to (start + 0, 42) -- Code(Counter(3)) at (prev + 1, 11) to (start + 0, 12) -- Code(Expression(0, Sub)) at (prev + 1, 20) to (start + 0, 23) +- Code(Counter(0)) at (prev + 1, 11) to (start + 0, 12) +- Code(Expression(0, Sub)) at (prev + 1, 20) to (start + 0, 31) = (c7 - (((c1 + c3) + c5) + c6)) -- Code(Expression(0, Sub)) at (prev + 0, 24) to (start + 0, 30) - = (c7 - (((c1 + c3) + c5) + c6)) -- Code(Counter(6)) at (prev + 3, 13) to (start + 0, 16) -- Code(Counter(6)) at (prev + 0, 17) to (start + 0, 22) -- Code(Counter(5)) at (prev + 2, 20) to (start + 2, 10) -- Code(Counter(4)) at (prev + 3, 23) to (start + 0, 24) -- Code(Counter(4)) at (prev + 0, 28) to (start + 2, 10) -- Code(Expression(5, Sub)) at (prev + 3, 20) to (start + 0, 23) - = (c3 - c4) -- Code(Expression(5, Sub)) at (prev + 0, 24) to (start + 0, 31) +- Code(Counter(6)) at (prev + 3, 13) to (start + 0, 23) +- Code(Counter(5)) at (prev + 3, 13) to (start + 0, 23) +- Code(Counter(3)) at (prev + 2, 20) to (start + 0, 24) +- Code(Counter(4)) at (prev + 1, 13) to (start + 0, 30) +- Code(Expression(4, Sub)) at (prev + 2, 20) to (start + 0, 32) = (c3 - c4) -- Code(Counter(2)) at (prev + 1, 14) to (start + 0, 19) -- Code(Counter(1)) at (prev + 0, 24) to (start + 0, 29) -- Code(Counter(2)) at (prev + 0, 33) to (start + 0, 34) -- Code(Counter(2)) at (prev + 0, 38) to (start + 2, 10) -- Code(Expression(8, Sub)) at (prev + 3, 14) to (start + 0, 19) - = (c1 - c2) -- Code(Expression(8, Sub)) at (prev + 0, 24) to (start + 0, 27) +- Code(Counter(1)) at (prev + 1, 24) to (start + 0, 34) +- Code(Counter(2)) at (prev + 1, 13) to (start + 0, 24) +- Code(Expression(5, Sub)) at (prev + 2, 24) to (start + 0, 36) = (c1 - c2) -- Code(Expression(8, Sub)) at (prev + 0, 28) to (start + 0, 35) - = (c1 - c2) -- Code(Expression(10, Sub)) at (prev + 1, 17) to (start + 0, 20) - = (c0 - c7) -- Code(Expression(10, Sub)) at (prev + 0, 21) to (start + 0, 27) +- Code(Expression(6, Sub)) at (prev + 1, 17) to (start + 0, 28) = (c0 - c7) - Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2) Highest counter ID seen: c6 diff --git a/tests/coverage/match.coverage b/tests/coverage/match.coverage index a69a8652b3c75..d8f1177d98a94 100644 --- a/tests/coverage/match.coverage +++ b/tests/coverage/match.coverage @@ -4,23 +4,22 @@ LL| |// Basic test for `match` expressions with various kinds of arms and guards. LL| | LL| 16|fn match_expr(x: Option, cond: bool) { - LL| 3| match x { + LL| 16| match x { LL| 0| Some(0) => say("zero"), LL| | Some(1) => { LL| | // (block with a trailing expression) LL| 1| say("one") LL| | } - LL| 2| Some(2) => { + LL| | Some(2) => { LL| 2| say("two"); - LL| 2| } - LL| 0| Some(3) if cond => { + LL| | } + LL| 3| Some(3) if cond => { LL| 0| say("three-cond"); - LL| 0| } + LL| | } LL| 3| Some(3) => say("three"), LL| 9| Some(other) if other == 4 => { - ^4 ^4 LL| 4| say("four"); - LL| 4| } + LL| | } LL| 5| Some(other) => say("other"), LL| 1| None => say("none"), LL| | } diff --git a/tests/coverage/no_spans_if_not.cov-map b/tests/coverage/no_spans_if_not.cov-map index c8aa5c7527d22..1ba99f6e1cd06 100644 --- a/tests/coverage/no_spans_if_not.cov-map +++ b/tests/coverage/no_spans_if_not.cov-map @@ -11,13 +11,13 @@ Number of file 0 mappings: 4 Highest counter ID seen: c0 Function name: no_spans_if_not::main -Raw bytes (19): 0x[01, 01, 00, 03, 01, 0b, 01, 00, 0a, 01, 01, 05, 00, 16, 01, 01, 01, 00, 02] +Raw bytes (19): 0x[01, 01, 00, 03, 01, 0b, 01, 00, 0a, 01, 01, 05, 00, 18, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/no_spans_if_not.rs Number of expressions: 0 Number of file 0 mappings: 3 - Code(Counter(0)) at (prev + 11, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 22) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 24) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/rustfmt-skip.cov-map b/tests/coverage/rustfmt-skip.cov-map index 25e4995ea6da2..bb673a411bfdd 100644 --- a/tests/coverage/rustfmt-skip.cov-map +++ b/tests/coverage/rustfmt-skip.cov-map @@ -1,11 +1,12 @@ Function name: rustfmt_skip::main -Raw bytes (19): 0x[01, 01, 00, 03, 01, 0a, 01, 00, 0a, 01, 02, 05, 00, 0d, 01, 05, 01, 00, 02] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 0a, 01, 00, 0a, 01, 02, 05, 00, 0d, 01, 03, 09, 00, 10, 01, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/rustfmt-skip.rs Number of expressions: 0 -Number of file 0 mappings: 3 +Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 10, 1) to (start + 0, 10) - Code(Counter(0)) at (prev + 2, 5) to (start + 0, 13) -- Code(Counter(0)) at (prev + 5, 1) to (start + 0, 2) +- Code(Counter(0)) at (prev + 3, 9) to (start + 0, 16) +- Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/rustfmt-skip.coverage b/tests/coverage/rustfmt-skip.coverage index 08471181f41b3..b7276cf0ee8b8 100644 --- a/tests/coverage/rustfmt-skip.coverage +++ b/tests/coverage/rustfmt-skip.coverage @@ -12,7 +12,7 @@ LL| 1| println!( LL| | // Keep this on a separate line, to distinguish instrumentation of LL| | // `println!` from instrumentation of its arguments. - LL| | "hello" + LL| 1| "hello" LL| | ); LL| 1|} diff --git a/tests/coverage/sort_groups.cov-map b/tests/coverage/sort_groups.cov-map index 29d54d88a87ee..3bb253bdf6d46 100644 --- a/tests/coverage/sort_groups.cov-map +++ b/tests/coverage/sort_groups.cov-map @@ -1,84 +1,84 @@ Function name: sort_groups::generic_fn::<&str> -Raw bytes (31): 0x[01, 01, 01, 01, 05, 05, 01, 11, 01, 00, 1d, 01, 01, 08, 00, 0c, 05, 00, 0d, 02, 06, 02, 02, 05, 00, 06, 01, 01, 01, 00, 02] +Raw bytes (36): 0x[01, 01, 01, 01, 05, 06, 01, 11, 01, 00, 1d, 01, 01, 08, 00, 0c, 05, 01, 09, 00, 11, 05, 00, 18, 00, 32, 02, 01, 05, 00, 06, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/sort_groups.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 5 +Number of file 0 mappings: 6 - Code(Counter(0)) at (prev + 17, 1) to (start + 0, 29) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 12) -- Code(Counter(1)) at (prev + 0, 13) to (start + 2, 6) -- Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 6) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 17) +- Code(Counter(1)) at (prev + 0, 24) to (start + 0, 50) +- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 6) = (c0 - c1) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c1 Function name: sort_groups::generic_fn::<()> -Raw bytes (31): 0x[01, 01, 01, 01, 05, 05, 01, 11, 01, 00, 1d, 01, 01, 08, 00, 0c, 05, 00, 0d, 02, 06, 02, 02, 05, 00, 06, 01, 01, 01, 00, 02] +Raw bytes (36): 0x[01, 01, 01, 01, 05, 06, 01, 11, 01, 00, 1d, 01, 01, 08, 00, 0c, 05, 01, 09, 00, 11, 05, 00, 18, 00, 32, 02, 01, 05, 00, 06, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/sort_groups.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 5 +Number of file 0 mappings: 6 - Code(Counter(0)) at (prev + 17, 1) to (start + 0, 29) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 12) -- Code(Counter(1)) at (prev + 0, 13) to (start + 2, 6) -- Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 6) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 17) +- Code(Counter(1)) at (prev + 0, 24) to (start + 0, 50) +- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 6) = (c0 - c1) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c1 Function name: sort_groups::generic_fn:: -Raw bytes (31): 0x[01, 01, 01, 01, 05, 05, 01, 11, 01, 00, 1d, 01, 01, 08, 00, 0c, 05, 00, 0d, 02, 06, 02, 02, 05, 00, 06, 01, 01, 01, 00, 02] +Raw bytes (36): 0x[01, 01, 01, 01, 05, 06, 01, 11, 01, 00, 1d, 01, 01, 08, 00, 0c, 05, 01, 09, 00, 11, 05, 00, 18, 00, 32, 02, 01, 05, 00, 06, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/sort_groups.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 5 +Number of file 0 mappings: 6 - Code(Counter(0)) at (prev + 17, 1) to (start + 0, 29) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 12) -- Code(Counter(1)) at (prev + 0, 13) to (start + 2, 6) -- Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 6) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 17) +- Code(Counter(1)) at (prev + 0, 24) to (start + 0, 50) +- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 6) = (c0 - c1) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c1 Function name: sort_groups::generic_fn:: -Raw bytes (31): 0x[01, 01, 01, 01, 05, 05, 01, 11, 01, 00, 1d, 01, 01, 08, 00, 0c, 05, 00, 0d, 02, 06, 02, 02, 05, 00, 06, 01, 01, 01, 00, 02] +Raw bytes (36): 0x[01, 01, 01, 01, 05, 06, 01, 11, 01, 00, 1d, 01, 01, 08, 00, 0c, 05, 01, 09, 00, 11, 05, 00, 18, 00, 32, 02, 01, 05, 00, 06, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/sort_groups.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 5 +Number of file 0 mappings: 6 - Code(Counter(0)) at (prev + 17, 1) to (start + 0, 29) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 12) -- Code(Counter(1)) at (prev + 0, 13) to (start + 2, 6) -- Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 6) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 17) +- Code(Counter(1)) at (prev + 0, 24) to (start + 0, 50) +- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 6) = (c0 - c1) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c1 Function name: sort_groups::main -Raw bytes (76): 0x[01, 01, 01, 01, 05, 0e, 01, 06, 01, 00, 0a, 01, 01, 09, 00, 0d, 01, 00, 10, 00, 2a, 01, 01, 05, 00, 15, 01, 00, 16, 00, 1a, 01, 01, 05, 00, 1f, 01, 00, 20, 00, 25, 01, 01, 08, 00, 1c, 05, 00, 24, 02, 06, 02, 02, 05, 00, 06, 01, 01, 05, 00, 16, 01, 00, 17, 00, 1b, 01, 01, 05, 00, 0d, 01, 01, 01, 00, 02] +Raw bytes (56): 0x[01, 01, 01, 01, 05, 0a, 01, 06, 01, 00, 0a, 01, 01, 10, 00, 2a, 01, 01, 05, 00, 1b, 01, 01, 05, 00, 26, 01, 01, 08, 00, 23, 05, 01, 09, 00, 21, 02, 01, 05, 00, 06, 01, 01, 05, 00, 1c, 01, 01, 05, 00, 0f, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/sort_groups.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 14 +Number of file 0 mappings: 10 - Code(Counter(0)) at (prev + 6, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 13) -- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 42) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 21) -- Code(Counter(0)) at (prev + 0, 22) to (start + 0, 26) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 31) -- Code(Counter(0)) at (prev + 0, 32) to (start + 0, 37) -- Code(Counter(0)) at (prev + 1, 8) to (start + 0, 28) -- Code(Counter(1)) at (prev + 0, 36) to (start + 2, 6) -- Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 6) +- Code(Counter(0)) at (prev + 1, 16) to (start + 0, 42) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 27) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 38) +- Code(Counter(0)) at (prev + 1, 8) to (start + 0, 35) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 33) +- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 6) = (c0 - c1) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 22) -- Code(Counter(0)) at (prev + 0, 23) to (start + 0, 27) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 28) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c1 diff --git a/tests/coverage/sort_groups.coverage b/tests/coverage/sort_groups.coverage index 6e8a4eda09f1e..23522577fdf77 100644 --- a/tests/coverage/sort_groups.coverage +++ b/tests/coverage/sort_groups.coverage @@ -26,8 +26,7 @@ | LL| 1|fn generic_fn(cond: bool) { | LL| 1| if cond { | LL| 1| println!("{}", std::any::type_name::()); - | LL| 1| } - | ^0 + | LL| 0| } | LL| 1|} ------------------ | sort_groups::generic_fn::<()>: diff --git a/tests/coverage/try-in-macro.attr.cov-map b/tests/coverage/try-in-macro.attr.cov-map index 1b6c97cf145a2..1606fdb59da28 100644 --- a/tests/coverage/try-in-macro.attr.cov-map +++ b/tests/coverage/try-in-macro.attr.cov-map @@ -1,11 +1,11 @@ Function name: try_in_macro::main -Raw bytes (19): 0x[01, 01, 00, 03, 01, 29, 01, 00, 0a, 01, 01, 05, 00, 1a, 01, 01, 01, 00, 02] +Raw bytes (19): 0x[01, 01, 00, 03, 01, 29, 01, 00, 0a, 01, 01, 05, 00, 1c, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/try-in-macro.rs Number of expressions: 0 Number of file 0 mappings: 3 - Code(Counter(0)) at (prev + 41, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 26) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 28) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/try-in-macro.bang.cov-map b/tests/coverage/try-in-macro.bang.cov-map index 1b6c97cf145a2..1606fdb59da28 100644 --- a/tests/coverage/try-in-macro.bang.cov-map +++ b/tests/coverage/try-in-macro.bang.cov-map @@ -1,11 +1,11 @@ Function name: try_in_macro::main -Raw bytes (19): 0x[01, 01, 00, 03, 01, 29, 01, 00, 0a, 01, 01, 05, 00, 1a, 01, 01, 01, 00, 02] +Raw bytes (19): 0x[01, 01, 00, 03, 01, 29, 01, 00, 0a, 01, 01, 05, 00, 1c, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/try-in-macro.rs Number of expressions: 0 Number of file 0 mappings: 3 - Code(Counter(0)) at (prev + 41, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 26) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 28) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/try-in-macro.derive.cov-map b/tests/coverage/try-in-macro.derive.cov-map index 1b6c97cf145a2..1606fdb59da28 100644 --- a/tests/coverage/try-in-macro.derive.cov-map +++ b/tests/coverage/try-in-macro.derive.cov-map @@ -1,11 +1,11 @@ Function name: try_in_macro::main -Raw bytes (19): 0x[01, 01, 00, 03, 01, 29, 01, 00, 0a, 01, 01, 05, 00, 1a, 01, 01, 01, 00, 02] +Raw bytes (19): 0x[01, 01, 00, 03, 01, 29, 01, 00, 0a, 01, 01, 05, 00, 1c, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/try-in-macro.rs Number of expressions: 0 Number of file 0 mappings: 3 - Code(Counter(0)) at (prev + 41, 1) to (start + 0, 10) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 26) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 28) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/unicode.cov-map b/tests/coverage/unicode.cov-map index b118c847e8fff..85f4aa5ab8de7 100644 --- a/tests/coverage/unicode.cov-map +++ b/tests/coverage/unicode.cov-map @@ -1,5 +1,5 @@ Function name: unicode::main -Raw bytes (58): 0x[01, 01, 02, 05, 01, 01, 0d, 0a, 01, 0e, 01, 00, 0a, 02, 01, 09, 00, 0c, 01, 00, 10, 00, 1b, 02, 00, 1c, 00, 28, 01, 02, 08, 00, 23, 09, 00, 29, 00, 44, 0d, 00, 47, 02, 06, 06, 02, 05, 00, 06, 01, 02, 05, 00, 0b, 01, 01, 01, 00, 02] +Raw bytes (58): 0x[01, 01, 02, 05, 01, 01, 0d, 0a, 01, 0e, 01, 00, 0a, 01, 01, 10, 00, 1b, 02, 00, 1c, 00, 28, 01, 02, 08, 00, 25, 09, 00, 29, 00, 46, 0d, 01, 09, 00, 11, 0d, 00, 12, 00, 18, 06, 01, 05, 00, 06, 01, 02, 05, 00, 0d, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/unicode.rs Number of expressions: 2 @@ -7,17 +7,16 @@ Number of expressions: 2 - expression 1 operands: lhs = Counter(0), rhs = Counter(3) Number of file 0 mappings: 10 - Code(Counter(0)) at (prev + 14, 1) to (start + 0, 10) -- Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 12) - = (c1 - c0) -- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 27) +- Code(Counter(0)) at (prev + 1, 16) to (start + 0, 27) - Code(Expression(0, Sub)) at (prev + 0, 28) to (start + 0, 40) = (c1 - c0) -- Code(Counter(0)) at (prev + 2, 8) to (start + 0, 35) -- Code(Counter(2)) at (prev + 0, 41) to (start + 0, 68) -- Code(Counter(3)) at (prev + 0, 71) to (start + 2, 6) -- Code(Expression(1, Sub)) at (prev + 2, 5) to (start + 0, 6) +- Code(Counter(0)) at (prev + 2, 8) to (start + 0, 37) +- Code(Counter(2)) at (prev + 0, 41) to (start + 0, 70) +- Code(Counter(3)) at (prev + 1, 9) to (start + 0, 17) +- Code(Counter(3)) at (prev + 0, 18) to (start + 0, 24) +- Code(Expression(1, Sub)) at (prev + 1, 5) to (start + 0, 6) = (c0 - c3) -- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 11) +- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 13) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c3 @@ -32,13 +31,13 @@ Number of file 0 mappings: 2 Highest counter ID seen: (none) Function name: unicode::申し訳ございません -Raw bytes (19): 0x[01, 01, 00, 03, 01, 18, 01, 00, 29, 01, 01, 05, 00, 19, 01, 01, 01, 00, 02] +Raw bytes (19): 0x[01, 01, 00, 03, 01, 18, 01, 00, 29, 01, 01, 05, 00, 20, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/unicode.rs Number of expressions: 0 Number of file 0 mappings: 3 - Code(Counter(0)) at (prev + 24, 1) to (start + 0, 41) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 25) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 32) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 diff --git a/tests/coverage/unicode.coverage b/tests/coverage/unicode.coverage index 188848889d30c..6ca6b347b6556 100644 --- a/tests/coverage/unicode.coverage +++ b/tests/coverage/unicode.coverage @@ -15,10 +15,10 @@ LL| 32| for _İ in 'А'..='Я' { /* Я */ } ^1 LL| | - LL| 1| if 申し訳ございません() && 申し訳ございません() { + LL| 1| if 申し訳ございません() && 申し訳ございません() { ^0 - LL| 0| println!("true"); - LL| 1| } + LL| 0| println!("true"); + LL| 1| } LL| | LL| 1| サビ(); LL| 1|} diff --git a/tests/coverage/unreachable.cov-map b/tests/coverage/unreachable.cov-map index c38786ee664c1..a718f4b352569 100644 --- a/tests/coverage/unreachable.cov-map +++ b/tests/coverage/unreachable.cov-map @@ -1,29 +1,29 @@ Function name: unreachable::UNREACHABLE_CLOSURE::{closure#0} (unused) -Raw bytes (9): 0x[01, 01, 00, 01, 00, 0e, 30, 00, 45] +Raw bytes (9): 0x[01, 01, 00, 01, 00, 0e, 30, 00, 47] Number of files: 1 - file 0 => $DIR/unreachable.rs Number of expressions: 0 Number of file 0 mappings: 1 -- Code(Zero) at (prev + 14, 48) to (start + 0, 69) +- Code(Zero) at (prev + 14, 48) to (start + 0, 71) Highest counter ID seen: (none) Function name: unreachable::unreachable_function (unused) -Raw bytes (14): 0x[01, 01, 00, 02, 00, 10, 01, 00, 1a, 00, 01, 0e, 00, 23] +Raw bytes (14): 0x[01, 01, 00, 02, 00, 10, 01, 00, 1a, 00, 01, 0e, 00, 25] Number of files: 1 - file 0 => $DIR/unreachable.rs Number of expressions: 0 Number of file 0 mappings: 2 - Code(Zero) at (prev + 16, 1) to (start + 0, 26) -- Code(Zero) at (prev + 1, 14) to (start + 0, 35) +- Code(Zero) at (prev + 1, 14) to (start + 0, 37) Highest counter ID seen: (none) Function name: unreachable::unreachable_intrinsic (unused) -Raw bytes (14): 0x[01, 01, 00, 02, 00, 15, 01, 00, 1b, 00, 01, 0e, 00, 2a] +Raw bytes (14): 0x[01, 01, 00, 02, 00, 15, 01, 00, 1b, 00, 01, 0e, 00, 2c] Number of files: 1 - file 0 => $DIR/unreachable.rs Number of expressions: 0 Number of file 0 mappings: 2 - Code(Zero) at (prev + 21, 1) to (start + 0, 27) -- Code(Zero) at (prev + 1, 14) to (start + 0, 42) +- Code(Zero) at (prev + 1, 14) to (start + 0, 44) Highest counter ID seen: (none) diff --git a/tests/coverage/unused.cov-map b/tests/coverage/unused.cov-map index 3380997b921ee..9ed39ecd44f75 100644 --- a/tests/coverage/unused.cov-map +++ b/tests/coverage/unused.cov-map @@ -1,15 +1,14 @@ Function name: unused::foo:: -Raw bytes (50): 0x[01, 01, 03, 05, 01, 05, 0b, 01, 09, 08, 01, 03, 01, 00, 10, 01, 01, 09, 00, 0e, 01, 00, 11, 00, 12, 05, 01, 0b, 00, 11, 02, 01, 09, 00, 0f, 06, 00, 13, 00, 19, 02, 01, 09, 00, 0f, 01, 02, 01, 00, 02] +Raw bytes (45): 0x[01, 01, 03, 05, 01, 05, 0b, 01, 09, 07, 01, 03, 01, 00, 10, 01, 01, 11, 00, 12, 05, 01, 0b, 00, 11, 02, 01, 09, 00, 0f, 06, 00, 13, 00, 19, 02, 01, 09, 00, 0f, 01, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/unused.rs Number of expressions: 3 - expression 0 operands: lhs = Counter(1), rhs = Counter(0) - expression 1 operands: lhs = Counter(1), rhs = Expression(2, Add) - expression 2 operands: lhs = Counter(0), rhs = Counter(2) -Number of file 0 mappings: 8 +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 3, 1) to (start + 0, 16) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 18) +- Code(Counter(0)) at (prev + 1, 17) to (start + 0, 18) - Code(Counter(1)) at (prev + 1, 11) to (start + 0, 17) - Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 15) = (c1 - c0) @@ -21,17 +20,16 @@ Number of file 0 mappings: 8 Highest counter ID seen: c1 Function name: unused::foo:: -Raw bytes (50): 0x[01, 01, 03, 05, 01, 05, 0b, 01, 09, 08, 01, 03, 01, 00, 10, 01, 01, 09, 00, 0e, 01, 00, 11, 00, 12, 05, 01, 0b, 00, 11, 02, 01, 09, 00, 0f, 06, 00, 13, 00, 19, 02, 01, 09, 00, 0f, 01, 02, 01, 00, 02] +Raw bytes (45): 0x[01, 01, 03, 05, 01, 05, 0b, 01, 09, 07, 01, 03, 01, 00, 10, 01, 01, 11, 00, 12, 05, 01, 0b, 00, 11, 02, 01, 09, 00, 0f, 06, 00, 13, 00, 19, 02, 01, 09, 00, 0f, 01, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/unused.rs Number of expressions: 3 - expression 0 operands: lhs = Counter(1), rhs = Counter(0) - expression 1 operands: lhs = Counter(1), rhs = Expression(2, Add) - expression 2 operands: lhs = Counter(0), rhs = Counter(2) -Number of file 0 mappings: 8 +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 3, 1) to (start + 0, 16) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 18) +- Code(Counter(0)) at (prev + 1, 17) to (start + 0, 18) - Code(Counter(1)) at (prev + 1, 11) to (start + 0, 17) - Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 15) = (c1 - c0) @@ -43,66 +41,65 @@ Number of file 0 mappings: 8 Highest counter ID seen: c1 Function name: unused::main -Raw bytes (29): 0x[01, 01, 00, 05, 01, 25, 01, 00, 1c, 01, 01, 05, 00, 0f, 01, 01, 05, 00, 0f, 01, 01, 05, 00, 0b, 01, 01, 01, 00, 02] +Raw bytes (29): 0x[01, 01, 00, 05, 01, 25, 01, 00, 1c, 01, 01, 05, 00, 12, 01, 01, 05, 00, 14, 01, 01, 05, 00, 0b, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/unused.rs Number of expressions: 0 Number of file 0 mappings: 5 - Code(Counter(0)) at (prev + 37, 1) to (start + 0, 28) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15) -- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 18) +- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 20) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 11) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: unused::unused_func (unused) -Raw bytes (29): 0x[01, 01, 00, 05, 00, 13, 01, 00, 1b, 00, 01, 08, 00, 0e, 00, 00, 0f, 02, 06, 00, 02, 05, 00, 06, 00, 01, 01, 00, 02] +Raw bytes (29): 0x[01, 01, 00, 05, 00, 13, 01, 00, 1b, 00, 01, 08, 00, 0e, 00, 01, 09, 00, 0f, 00, 01, 05, 00, 06, 00, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/unused.rs Number of expressions: 0 Number of file 0 mappings: 5 - Code(Zero) at (prev + 19, 1) to (start + 0, 27) - Code(Zero) at (prev + 1, 8) to (start + 0, 14) -- Code(Zero) at (prev + 0, 15) to (start + 2, 6) -- Code(Zero) at (prev + 2, 5) to (start + 0, 6) +- Code(Zero) at (prev + 1, 9) to (start + 0, 15) +- Code(Zero) at (prev + 1, 5) to (start + 0, 6) - Code(Zero) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: (none) Function name: unused::unused_func2 (unused) -Raw bytes (29): 0x[01, 01, 00, 05, 00, 19, 01, 00, 1c, 00, 01, 08, 00, 0e, 00, 00, 0f, 02, 06, 00, 02, 05, 00, 06, 00, 01, 01, 00, 02] +Raw bytes (29): 0x[01, 01, 00, 05, 00, 19, 01, 00, 1c, 00, 01, 08, 00, 0e, 00, 01, 09, 00, 0f, 00, 01, 05, 00, 06, 00, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/unused.rs Number of expressions: 0 Number of file 0 mappings: 5 - Code(Zero) at (prev + 25, 1) to (start + 0, 28) - Code(Zero) at (prev + 1, 8) to (start + 0, 14) -- Code(Zero) at (prev + 0, 15) to (start + 2, 6) -- Code(Zero) at (prev + 2, 5) to (start + 0, 6) +- Code(Zero) at (prev + 1, 9) to (start + 0, 15) +- Code(Zero) at (prev + 1, 5) to (start + 0, 6) - Code(Zero) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: (none) Function name: unused::unused_func3 (unused) -Raw bytes (29): 0x[01, 01, 00, 05, 00, 1f, 01, 00, 1c, 00, 01, 08, 00, 0e, 00, 00, 0f, 02, 06, 00, 02, 05, 00, 06, 00, 01, 01, 00, 02] +Raw bytes (29): 0x[01, 01, 00, 05, 00, 1f, 01, 00, 1c, 00, 01, 08, 00, 0e, 00, 01, 09, 00, 0f, 00, 01, 05, 00, 06, 00, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/unused.rs Number of expressions: 0 Number of file 0 mappings: 5 - Code(Zero) at (prev + 31, 1) to (start + 0, 28) - Code(Zero) at (prev + 1, 8) to (start + 0, 14) -- Code(Zero) at (prev + 0, 15) to (start + 2, 6) -- Code(Zero) at (prev + 2, 5) to (start + 0, 6) +- Code(Zero) at (prev + 1, 9) to (start + 0, 15) +- Code(Zero) at (prev + 1, 5) to (start + 0, 6) - Code(Zero) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: (none) Function name: unused::unused_template_func::<_> (unused) -Raw bytes (44): 0x[01, 01, 00, 08, 00, 0b, 01, 00, 21, 00, 01, 09, 00, 0e, 00, 00, 11, 00, 12, 00, 01, 0b, 00, 11, 00, 01, 09, 00, 0f, 00, 00, 13, 00, 19, 00, 01, 09, 00, 0f, 00, 02, 01, 00, 02] +Raw bytes (39): 0x[01, 01, 00, 07, 00, 0b, 01, 00, 21, 00, 01, 11, 00, 12, 00, 01, 0b, 00, 11, 00, 01, 09, 00, 0f, 00, 00, 13, 00, 19, 00, 01, 09, 00, 0f, 00, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/unused.rs Number of expressions: 0 -Number of file 0 mappings: 8 +Number of file 0 mappings: 7 - Code(Zero) at (prev + 11, 1) to (start + 0, 33) -- Code(Zero) at (prev + 1, 9) to (start + 0, 14) -- Code(Zero) at (prev + 0, 17) to (start + 0, 18) +- Code(Zero) at (prev + 1, 17) to (start + 0, 18) - Code(Zero) at (prev + 1, 11) to (start + 0, 17) - Code(Zero) at (prev + 1, 9) to (start + 0, 15) - Code(Zero) at (prev + 0, 19) to (start + 0, 25) diff --git a/tests/coverage/unused_mod.cov-map b/tests/coverage/unused_mod.cov-map index ab8aad618e511..ea419edbdafe6 100644 --- a/tests/coverage/unused_mod.cov-map +++ b/tests/coverage/unused_mod.cov-map @@ -1,22 +1,24 @@ Function name: unused_mod::main -Raw bytes (19): 0x[01, 01, 00, 03, 01, 04, 01, 00, 0a, 01, 01, 05, 00, 0d, 01, 01, 01, 00, 02] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 04, 01, 00, 0a, 01, 01, 05, 00, 0d, 01, 00, 0e, 00, 1c, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/unused_mod.rs Number of expressions: 0 -Number of file 0 mappings: 3 +Number of file 0 mappings: 4 - Code(Counter(0)) at (prev + 4, 1) to (start + 0, 10) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13) +- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 28) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c0 Function name: unused_mod::unused_module::never_called_function (unused) -Raw bytes (19): 0x[01, 02, 00, 03, 00, 02, 01, 00, 1f, 00, 01, 05, 00, 0d, 00, 01, 01, 00, 02] +Raw bytes (24): 0x[01, 02, 00, 04, 00, 02, 01, 00, 1f, 00, 01, 05, 00, 0d, 00, 00, 0e, 00, 21, 00, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/auxiliary/unused_mod_helper.rs Number of expressions: 0 -Number of file 0 mappings: 3 +Number of file 0 mappings: 4 - Code(Zero) at (prev + 2, 1) to (start + 0, 31) - Code(Zero) at (prev + 1, 5) to (start + 0, 13) +- Code(Zero) at (prev + 0, 14) to (start + 0, 33) - Code(Zero) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: (none) diff --git a/tests/coverage/while.cov-map b/tests/coverage/while.cov-map index 52bef0a80dfb1..fd0cc90e05fe5 100644 --- a/tests/coverage/while.cov-map +++ b/tests/coverage/while.cov-map @@ -1,42 +1,36 @@ Function name: while::while_with_tail_expr -Raw bytes (56): 0x[01, 01, 01, 05, 01, 0a, 01, 06, 01, 00, 1a, 01, 01, 09, 00, 0e, 01, 00, 11, 00, 12, 05, 01, 0b, 00, 10, 02, 01, 09, 00, 0f, 02, 01, 09, 00, 0c, 02, 00, 0d, 00, 1a, 01, 02, 05, 00, 08, 01, 00, 09, 00, 12, 01, 01, 01, 00, 02] +Raw bytes (41): 0x[01, 01, 01, 05, 01, 07, 01, 06, 01, 00, 1a, 01, 01, 11, 00, 12, 05, 01, 0b, 00, 10, 02, 01, 09, 00, 0f, 02, 01, 09, 00, 1b, 01, 02, 05, 00, 13, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/while.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(1), rhs = Counter(0) -Number of file 0 mappings: 10 +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 6, 1) to (start + 0, 26) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 18) +- Code(Counter(0)) at (prev + 1, 17) to (start + 0, 18) - Code(Counter(1)) at (prev + 1, 11) to (start + 0, 16) - Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 15) = (c1 - c0) -- Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 12) +- Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 27) = (c1 - c0) -- Code(Expression(0, Sub)) at (prev + 0, 13) to (start + 0, 26) - = (c1 - c0) -- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 8) -- Code(Counter(0)) at (prev + 0, 9) to (start + 0, 18) +- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 19) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c1 Function name: while::while_with_tail_stmt -Raw bytes (51): 0x[01, 01, 01, 05, 01, 09, 01, 0f, 01, 00, 1a, 01, 01, 09, 00, 0e, 01, 00, 11, 00, 12, 05, 01, 0b, 00, 10, 02, 00, 11, 03, 06, 02, 01, 09, 00, 0f, 01, 03, 05, 00, 08, 01, 00, 09, 00, 12, 01, 01, 01, 00, 02] +Raw bytes (41): 0x[01, 01, 01, 05, 01, 07, 01, 0f, 01, 00, 1a, 01, 01, 11, 00, 12, 05, 01, 0b, 00, 10, 02, 01, 09, 00, 0f, 02, 01, 09, 00, 1b, 01, 02, 05, 00, 13, 01, 01, 01, 00, 02] Number of files: 1 - file 0 => $DIR/while.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(1), rhs = Counter(0) -Number of file 0 mappings: 9 +Number of file 0 mappings: 7 - Code(Counter(0)) at (prev + 15, 1) to (start + 0, 26) -- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 14) -- Code(Counter(0)) at (prev + 0, 17) to (start + 0, 18) +- Code(Counter(0)) at (prev + 1, 17) to (start + 0, 18) - Code(Counter(1)) at (prev + 1, 11) to (start + 0, 16) -- Code(Expression(0, Sub)) at (prev + 0, 17) to (start + 3, 6) - = (c1 - c0) - Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 15) = (c1 - c0) -- Code(Counter(0)) at (prev + 3, 5) to (start + 0, 8) -- Code(Counter(0)) at (prev + 0, 9) to (start + 0, 18) +- Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 27) + = (c1 - c0) +- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 19) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) Highest counter ID seen: c1 diff --git a/tests/coverage/while.coverage b/tests/coverage/while.coverage index a83198bbc675e..62e5982c18590 100644 --- a/tests/coverage/while.coverage +++ b/tests/coverage/while.coverage @@ -17,7 +17,7 @@ LL| 6| while x > 0 { LL| 5| x -= 1; LL| 5| say("decreased x"); - LL| 5| } + LL| | } LL| 1| say("goodbye"); LL| 1|} LL| | diff --git a/tests/mir-opt/coverage/branch_match_arms.main.InstrumentCoverage.diff b/tests/mir-opt/coverage/branch_match_arms.main.InstrumentCoverage.diff index fa88211383a04..223856b4541c6 100644 --- a/tests/mir-opt/coverage/branch_match_arms.main.InstrumentCoverage.diff +++ b/tests/mir-opt/coverage/branch_match_arms.main.InstrumentCoverage.diff @@ -28,23 +28,19 @@ + coverage Code { bcb: bcb0 } => $DIR/branch_match_arms.rs:14:1: 14:10 (#0); + coverage Code { bcb: bcb0 } => $DIR/branch_match_arms.rs:15:11: 15:21 (#0); -+ coverage Code { bcb: bcb1 } => $DIR/branch_match_arms.rs:16:17: 16:18 (#0); -+ coverage Code { bcb: bcb1 } => $DIR/branch_match_arms.rs:16:23: 16:30 (#0); -+ coverage Code { bcb: bcb1 } => $DIR/branch_match_arms.rs:16:31: 16:32 (#0); -+ coverage Code { bcb: bcb3 } => $DIR/branch_match_arms.rs:17:17: 17:18 (#0); -+ coverage Code { bcb: bcb3 } => $DIR/branch_match_arms.rs:17:23: 17:30 (#0); -+ coverage Code { bcb: bcb3 } => $DIR/branch_match_arms.rs:17:31: 17:32 (#0); -+ coverage Code { bcb: bcb4 } => $DIR/branch_match_arms.rs:18:17: 18:18 (#0); -+ coverage Code { bcb: bcb4 } => $DIR/branch_match_arms.rs:18:23: 18:30 (#0); -+ coverage Code { bcb: bcb4 } => $DIR/branch_match_arms.rs:18:31: 18:32 (#0); -+ coverage Code { bcb: bcb5 } => $DIR/branch_match_arms.rs:19:17: 19:18 (#0); -+ coverage Code { bcb: bcb5 } => $DIR/branch_match_arms.rs:19:23: 19:30 (#0); -+ coverage Code { bcb: bcb5 } => $DIR/branch_match_arms.rs:19:31: 19:32 (#0); ++ coverage Code { bcb: bcb1 } => $DIR/branch_match_arms.rs:16:23: 16:33 (#0); ++ coverage Code { bcb: bcb3 } => $DIR/branch_match_arms.rs:17:23: 17:33 (#0); ++ coverage Code { bcb: bcb4 } => $DIR/branch_match_arms.rs:18:23: 18:33 (#0); ++ coverage Code { bcb: bcb5 } => $DIR/branch_match_arms.rs:19:23: 19:33 (#0); + coverage Code { bcb: bcb2 } => $DIR/branch_match_arms.rs:21:1: 21:2 (#0); + bb0: { + Coverage::VirtualCounter(bcb0); + Coverage::Point(Expr, HirId(DefId(0:16 ~ branch_match_arms[d109]::main).48); + Coverage::Point(Expr, HirId(DefId(0:16 ~ branch_match_arms[d109]::main).2); + Coverage::Point(Expr, HirId(DefId(0:16 ~ branch_match_arms[d109]::main).3); StorageLive(_1); + Coverage::Point(Expr, HirId(DefId(0:16 ~ branch_match_arms[d109]::main).7); _1 = Enum::A(const 0_u32); PlaceMention(_1); _2 = discriminant(_1); @@ -75,6 +71,9 @@ + Coverage::VirtualCounter(bcb5); StorageLive(_9); _9 = copy ((_1 as A).0: u32); + Coverage::Point(Expr, HirId(DefId(0:16 ~ branch_match_arms[d109]::main).43); + Coverage::Point(Expr, HirId(DefId(0:16 ~ branch_match_arms[d109]::main).44); + Coverage::Point(Expr, HirId(DefId(0:16 ~ branch_match_arms[d109]::main).46); StorageLive(_10); _10 = copy _9; _0 = consume(move _10) -> [return: bb12, unwind: bb14]; @@ -83,6 +82,9 @@ bb6: { StorageLive(_7); _7 = copy ((_1 as B).0: u32); + Coverage::Point(Expr, HirId(DefId(0:16 ~ branch_match_arms[d109]::main).33); + Coverage::Point(Expr, HirId(DefId(0:16 ~ branch_match_arms[d109]::main).34); + Coverage::Point(Expr, HirId(DefId(0:16 ~ branch_match_arms[d109]::main).36); StorageLive(_8); _8 = copy _7; _0 = consume(move _8) -> [return: bb11, unwind: bb14]; @@ -91,6 +93,9 @@ bb7: { StorageLive(_5); _5 = copy ((_1 as C).0: u32); + Coverage::Point(Expr, HirId(DefId(0:16 ~ branch_match_arms[d109]::main).23); + Coverage::Point(Expr, HirId(DefId(0:16 ~ branch_match_arms[d109]::main).24); + Coverage::Point(Expr, HirId(DefId(0:16 ~ branch_match_arms[d109]::main).26); StorageLive(_6); _6 = copy _5; _0 = consume(move _6) -> [return: bb10, unwind: bb14]; @@ -99,6 +104,9 @@ bb8: { StorageLive(_3); _3 = copy ((_1 as D).0: u32); + Coverage::Point(Expr, HirId(DefId(0:16 ~ branch_match_arms[d109]::main).13); + Coverage::Point(Expr, HirId(DefId(0:16 ~ branch_match_arms[d109]::main).14); + Coverage::Point(Expr, HirId(DefId(0:16 ~ branch_match_arms[d109]::main).16); StorageLive(_4); _4 = copy _3; _0 = consume(move _4) -> [return: bb9, unwind: bb14]; @@ -131,6 +139,7 @@ bb13: { + Coverage::VirtualCounter(bcb2); StorageDead(_1); + Coverage::Point(FunctionEnd, HirId(DefId(0:16 ~ branch_match_arms[d109]::main).0); return; } diff --git a/tests/mir-opt/coverage/instrument_coverage.bar.InstrumentCoverage.diff b/tests/mir-opt/coverage/instrument_coverage.bar.InstrumentCoverage.diff index 9b6d2b22087b6..01b01a356c00c 100644 --- a/tests/mir-opt/coverage/instrument_coverage.bar.InstrumentCoverage.diff +++ b/tests/mir-opt/coverage/instrument_coverage.bar.InstrumentCoverage.diff @@ -10,7 +10,10 @@ + bb0: { + Coverage::VirtualCounter(bcb0); + Coverage::Point(Expr, HirId(DefId(0:4 ~ instrument_coverage[f559]::bar).3); + Coverage::Point(Expr, HirId(DefId(0:4 ~ instrument_coverage[f559]::bar).2); _0 = const true; + Coverage::Point(FunctionEnd, HirId(DefId(0:4 ~ instrument_coverage[f559]::bar).0); return; } } diff --git a/tests/mir-opt/coverage/instrument_coverage.main.InstrumentCoverage.diff b/tests/mir-opt/coverage/instrument_coverage.main.InstrumentCoverage.diff index b2bb2375aee60..29dfacfcd95d4 100644 --- a/tests/mir-opt/coverage/instrument_coverage.main.InstrumentCoverage.diff +++ b/tests/mir-opt/coverage/instrument_coverage.main.InstrumentCoverage.diff @@ -8,13 +8,15 @@ let mut _3: !; + coverage Code { bcb: bcb0 } => $DIR/instrument_coverage.rs:13:1: 13:10 (#0); -+ coverage Code { bcb: bcb1 } => $DIR/instrument_coverage.rs:15:12: 15:15 (#0); ++ coverage Code { bcb: bcb1 } => $DIR/instrument_coverage.rs:15:12: 15:17 (#0); + coverage Code { bcb: bcb2 } => $DIR/instrument_coverage.rs:16:13: 16:18 (#0); + coverage Code { bcb: bcb3 } => $DIR/instrument_coverage.rs:17:9: 17:10 (#0); + coverage Code { bcb: bcb2 } => $DIR/instrument_coverage.rs:19:1: 19:2 (#0); + bb0: { + Coverage::VirtualCounter(bcb0); + Coverage::Point(Expr, HirId(DefId(0:3 ~ instrument_coverage[f559]::main).12); + Coverage::Point(Expr, HirId(DefId(0:3 ~ instrument_coverage[f559]::main).2); goto -> bb1; } @@ -24,7 +26,10 @@ } bb2: { + Coverage::Point(Expr, HirId(DefId(0:3 ~ instrument_coverage[f559]::main).4); + Coverage::Point(Expr, HirId(DefId(0:3 ~ instrument_coverage[f559]::main).5); StorageLive(_2); + Coverage::Point(Expr, HirId(DefId(0:3 ~ instrument_coverage[f559]::main).6); _2 = bar() -> [return: bb3, unwind: bb6]; } @@ -34,13 +39,17 @@ bb4: { + Coverage::VirtualCounter(bcb2); + Coverage::Point(Expr, HirId(DefId(0:3 ~ instrument_coverage[f559]::main).11); + Coverage::Point(Expr, HirId(DefId(0:3 ~ instrument_coverage[f559]::main).9); _0 = const (); StorageDead(_2); + Coverage::Point(FunctionEnd, HirId(DefId(0:3 ~ instrument_coverage[f559]::main).0); return; } bb5: { + Coverage::VirtualCounter(bcb3); + Coverage::Point(ImplicitElse, HirId(DefId(0:3 ~ instrument_coverage[f559]::main).4); _1 = const (); StorageDead(_2); goto -> bb1; diff --git a/tests/mir-opt/coverage/instrument_coverage_cleanup.main.CleanupPostBorrowck.diff b/tests/mir-opt/coverage/instrument_coverage_cleanup.main.CleanupPostBorrowck.diff index 2eb78c08ee800..9c5e603c69aec 100644 --- a/tests/mir-opt/coverage/instrument_coverage_cleanup.main.CleanupPostBorrowck.diff +++ b/tests/mir-opt/coverage/instrument_coverage_cleanup.main.CleanupPostBorrowck.diff @@ -16,9 +16,19 @@ bb0: { Coverage::VirtualCounter(bcb0); -- Coverage::SpanMarker; +- Coverage::Point(Expr, HirId(DefId(0:3 ~ instrument_coverage_cleanup[820a]::main).12); +- Coverage::Point(Expr, HirId(DefId(0:3 ~ instrument_coverage_cleanup[820a]::main).2); +- Coverage::Point(Expr, HirId(DefId(0:3 ~ instrument_coverage_cleanup[820a]::main).3); +- Coverage::Point(Expr, HirId(DefId(0:3 ~ instrument_coverage_cleanup[820a]::main).4); ++ nop; ++ nop; ++ nop; + nop; StorageLive(_1); +- Coverage::Point(Expr, HirId(DefId(0:3 ~ instrument_coverage_cleanup[820a]::main).5); +- Coverage::Point(Expr, HirId(DefId(0:3 ~ instrument_coverage_cleanup[820a]::main).9); ++ nop; ++ nop; _1 = std::hint::black_box::(const true) -> [return: bb1, unwind: bb5]; } @@ -29,6 +39,8 @@ bb2: { Coverage::VirtualCounter(bcb1); - Coverage::BlockMarker(1); +- Coverage::Point(ImplicitElse, HirId(DefId(0:3 ~ instrument_coverage_cleanup[820a]::main).2); ++ nop; + nop; _0 = const (); goto -> bb4; @@ -37,6 +49,8 @@ bb3: { Coverage::VirtualCounter(bcb3); - Coverage::BlockMarker(0); +- Coverage::Point(Expr, HirId(DefId(0:3 ~ instrument_coverage_cleanup[820a]::main).11); ++ nop; + nop; _0 = const (); goto -> bb4; @@ -45,6 +59,8 @@ bb4: { Coverage::VirtualCounter(bcb2); StorageDead(_1); +- Coverage::Point(FunctionEnd, HirId(DefId(0:3 ~ instrument_coverage_cleanup[820a]::main).0); ++ nop; return; } diff --git a/tests/mir-opt/coverage/instrument_coverage_cleanup.main.InstrumentCoverage.diff b/tests/mir-opt/coverage/instrument_coverage_cleanup.main.InstrumentCoverage.diff index 0c1bc24b6dc19..4365ae794d8ce 100644 --- a/tests/mir-opt/coverage/instrument_coverage_cleanup.main.InstrumentCoverage.diff +++ b/tests/mir-opt/coverage/instrument_coverage_cleanup.main.InstrumentCoverage.diff @@ -16,8 +16,13 @@ + bb0: { + Coverage::VirtualCounter(bcb0); - Coverage::SpanMarker; + Coverage::Point(Expr, HirId(DefId(0:3 ~ instrument_coverage_cleanup[820a]::main).12); + Coverage::Point(Expr, HirId(DefId(0:3 ~ instrument_coverage_cleanup[820a]::main).2); + Coverage::Point(Expr, HirId(DefId(0:3 ~ instrument_coverage_cleanup[820a]::main).3); + Coverage::Point(Expr, HirId(DefId(0:3 ~ instrument_coverage_cleanup[820a]::main).4); StorageLive(_1); + Coverage::Point(Expr, HirId(DefId(0:3 ~ instrument_coverage_cleanup[820a]::main).5); + Coverage::Point(Expr, HirId(DefId(0:3 ~ instrument_coverage_cleanup[820a]::main).9); _1 = std::hint::black_box::(const true) -> [return: bb1, unwind: bb5]; } @@ -28,6 +33,7 @@ bb2: { + Coverage::VirtualCounter(bcb1); Coverage::BlockMarker(1); + Coverage::Point(ImplicitElse, HirId(DefId(0:3 ~ instrument_coverage_cleanup[820a]::main).2); _0 = const (); goto -> bb4; } @@ -35,6 +41,7 @@ bb3: { + Coverage::VirtualCounter(bcb3); Coverage::BlockMarker(0); + Coverage::Point(Expr, HirId(DefId(0:3 ~ instrument_coverage_cleanup[820a]::main).11); _0 = const (); goto -> bb4; } @@ -42,6 +49,7 @@ bb4: { + Coverage::VirtualCounter(bcb2); StorageDead(_1); + Coverage::Point(FunctionEnd, HirId(DefId(0:3 ~ instrument_coverage_cleanup[820a]::main).0); return; } diff --git a/tests/mir-opt/coverage/instrument_coverage_cleanup.rs b/tests/mir-opt/coverage/instrument_coverage_cleanup.rs index e8af4d6174f43..d725148e52707 100644 --- a/tests/mir-opt/coverage/instrument_coverage_cleanup.rs +++ b/tests/mir-opt/coverage/instrument_coverage_cleanup.rs @@ -2,7 +2,7 @@ // inserted during MIR building (after InstrumentCoverage is done with them), // but leaves the statements that were added by InstrumentCoverage. // -// Removed statement kinds: BlockMarker, SpanMarker +// Removed statement kinds: Point, BlockMarker // Retained statement kinds: VirtualCounter //@ test-mir-pass: InstrumentCoverage @@ -14,8 +14,8 @@ fn main() { if !core::hint::black_box(true) {} } +// CHECK-NOT: Coverage::Point // CHECK-NOT: Coverage::BlockMarker -// CHECK-NOT: Coverage::SpanMarker // CHECK: Coverage::VirtualCounter +// CHECK-NOT: Coverage::Point // CHECK-NOT: Coverage::BlockMarker -// CHECK-NOT: Coverage::SpanMarker