Skip to main content

Module diagnostics

Module diagnostics 

Source

Re-exportsยง

use std::fmt; ๐Ÿ”’
use std::fmt::Write; ๐Ÿ”’
use std::num::NonZero; ๐Ÿ”’
use std::sync::Mutex; ๐Ÿ”’
use rustc_abi::Align; ๐Ÿ”’
use rustc_abi::Size; ๐Ÿ”’
use rustc_data_structures::fx::FxBuildHasher; ๐Ÿ”’
use rustc_data_structures::fx::FxHashSet; ๐Ÿ”’
use rustc_errors::Diag; ๐Ÿ”’
use rustc_errors::Level; ๐Ÿ”’
use rustc_errors::MultiSpan; ๐Ÿ”’
use rustc_errors::Sublevel; ๐Ÿ”’
use rustc_span::DUMMY_SP; ๐Ÿ”’
use rustc_span::Span; ๐Ÿ”’
use rustc_span::Symbol; ๐Ÿ”’
use crate::borrow_tracker::stacked_borrows::diagnostics::TagHistory; ๐Ÿ”’
use crate::borrow_tracker::tree_borrows::diagnostics as tree_diagnostics; ๐Ÿ”’
use crate::*; ๐Ÿ”’

Macrosยง

help ๐Ÿ”’
help_span ๐Ÿ”’
note ๐Ÿ”’
Generate a note/help text without a span.
note_span ๐Ÿ”’
Generate a note/help text with a span.

Structsยง

RacingOp
SpanDedupDiagnostic
Helps deduplicate a diagnostic to ensure it is only shown once per span.

Enumsยง

DiagLevel ๐Ÿ”’
Level of Miri specific diagnostics
ExtraKind ๐Ÿ”’
The kind of extra annotations.
NonHaltingDiagnostic
Miri specific diagnostics
TerminationInfo
Details of premature program termination.

Traitsยง

EvalContextExt

Functionsยง

prune_stacktrace
Attempts to prune a stacktrace to omit the Rust runtime, and returns a bool indicating if any frames were pruned. If the stacktrace does not have any local frames, we conclude that it must be pointing to a problem in the Rust runtime itself, and do not prune it at all.
report_leaks
report_msg ๐Ÿ”’
Report an error or note (depending on the error argument) with the given stacktrace. Also emits a full stacktrace of the interpreter stack. We want to present a multi-line span message for some errors. Diagnostics do not support this directly, so we pass the lines as a Vec<String> and display each line after the first with an additional span_label or note call.
report_result
Report the result of a Miri execution.