Skip to main content

Module expansion

Module expansion 

Source

Re-exportsΒ§

use itertools::Itertools; πŸ”’
use rustc_data_structures::fx::FxIndexMap; πŸ”’
use rustc_data_structures::fx::FxIndexSet; πŸ”’
use rustc_data_structures::fx::IndexEntry; πŸ”’
use rustc_middle::mir; πŸ”’
use rustc_middle::mir::coverage::BasicCoverageBlock; πŸ”’
use rustc_middle::mir::coverage::BranchSpan; πŸ”’
use rustc_span::ExpnKind; πŸ”’
use rustc_span::Span; πŸ”’
use rustc_span::SyntaxContext; πŸ”’
use crate::coverage::from_mir; πŸ”’
use crate::coverage::graph::CoverageGraph; πŸ”’
use crate::coverage::hir_info::ExtractedHirInfo; πŸ”’
use crate::coverage::mappings::MappingsError; πŸ”’

StructsΒ§

ExpnNode πŸ”’
ExpnTree πŸ”’
MinMaxBcbs πŸ”’
SpanWithBcb πŸ”’

FunctionsΒ§

build_expn_tree πŸ”’
Extracts raw span/BCB pairs from potentially-different syntax contexts, and arranges them into an β€œexpansion tree” based on their expansion call-sites.
minmax_bcbs_for_expn_tree_node πŸ”’
For a single node in the expansion tree, compute its β€œminimum” and β€œmaximum” BCBs (in dominator order), from among the BCBs of its immediate spans, and the min/max of its immediate children.
sort_nodes_depth_first πŸ”’
Sorts the tree nodes in the map into depth-first order.