CompileWarning

Type Alias CompileWarning 

Source
pub type CompileWarning = DiagnosticWrapper<WarningKind>;
Expand description

A compilation warning with optional source location information.

Warnings don’t stop compilation but indicate potential issues in the code.

Warnings can include rich diagnostic information using the builder methods:

CompileWarning::new(WarningKind::UnusedVariable("x".into()), span)
    .with_help("if this is intentional, prefix it with an underscore: `_x`")

Aliased Type§

pub struct CompileWarning {
    pub kind: WarningKind,
    /* private fields */
}

Fields§

§kind: WarningKind

The specific kind of diagnostic.