pub struct ProvenanceTables {
spans: PrimaryMap<SpanId, SourceSpan>,
origins: PrimaryMap<OriginId, Origin>,
}Expand description
Arena-backed provenance tables shared by all passes.
Fields§
§spans: PrimaryMap<SpanId, SourceSpan>§origins: PrimaryMap<OriginId, Origin>Implementations§
Source§impl ProvenanceTables
impl ProvenanceTables
Sourcepub fn intern_span(&mut self, span: SourceSpan) -> SpanId
pub fn intern_span(&mut self, span: SourceSpan) -> SpanId
Intern a source span and return its stable id.
Sourcepub fn record_parsed(&mut self, span: SourceSpan) -> OriginId
pub fn record_parsed(&mut self, span: SourceSpan) -> OriginId
Record one parsed origin from a source span.
Sourcepub fn record_expanded(&mut self, from: OriginId, phase: PassId) -> OriginId
pub fn record_expanded(&mut self, from: OriginId, phase: PassId) -> OriginId
Record one expanded origin from an existing origin id.
Sourcepub fn record_lowered(&mut self, from: OriginId, phase: PassId) -> OriginId
pub fn record_lowered(&mut self, from: OriginId, phase: PassId) -> OriginId
Record one lowered origin from an existing origin id.
Sourcepub fn record_synthesized(
&mut self,
reason: &'static str,
parent: Option<OriginId>,
) -> OriginId
pub fn record_synthesized( &mut self, reason: &'static str, parent: Option<OriginId>, ) -> OriginId
Record one synthesized origin.
Sourcepub fn span(&self, span_id: SpanId) -> &SourceSpan
pub fn span(&self, span_id: SpanId) -> &SourceSpan
Return one span by id.
Sourcepub fn summary(&self) -> ProvenanceSummary
pub fn summary(&self) -> ProvenanceSummary
Return aggregate counters for provenance tables.
Trait Implementations§
Source§impl Debug for ProvenanceTables
impl Debug for ProvenanceTables
Source§impl Default for ProvenanceTables
impl Default for ProvenanceTables
Source§fn default() -> ProvenanceTables
fn default() -> ProvenanceTables
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ProvenanceTables
impl RefUnwindSafe for ProvenanceTables
impl Send for ProvenanceTables
impl Sync for ProvenanceTables
impl Unpin for ProvenanceTables
impl UnwindSafe for ProvenanceTables
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more