track_diagnostic in rustc_interface::callbacks - Rust
Description: This is a callback from `rustc_errors` as it cannot access the implicit state in `rustc_middle` otherwise. It is used when diagnostic messages are emitted and stores them in the current query, if there is one.

Skip to main content

## track_diagnostic

# Function track_diagnostic

Source

    fn track_diagnostic<R>(
        diagnostic: DiagInner,
        f: &mut dyn FnMut(DiagInner) -> R,
    ) -> R

Expand description

This is a callback from `rustc_errors` as it cannot access the implicit state in `rustc_middle` otherwise. It is used when diagnostic messages are emitted and stores them in the current query, if there is one.