Skip to main content

set_phase

Function set_phase 

Source
pub fn set_phase(phase: AnalysisPhase) -> ContextGuard
Expand description

Set the current analysis phase.

Returns a guard that restores the previous phase on drop.

§Example

let _phase = set_phase(AnalysisPhase::Parsing);
// Do parsing work...
// Phase automatically restored when _phase drops