Trait ra_ap_hir_expand::diagnostics::Diagnostic[][src]

pub trait Diagnostic: Any + Send + Sync + Debug + 'static {
    fn code(&self) -> DiagnosticCode;
fn message(&self) -> String;
fn display_source(&self) -> InFile<SyntaxNodePtr>;
fn as_any(&self) -> &(dyn Any + Send + 'static); fn is_experimental(&self) -> bool { ... } }

Required methods

fn code(&self) -> DiagnosticCode[src]

fn message(&self) -> String[src]

fn display_source(&self) -> InFile<SyntaxNodePtr>[src]

Source element that triggered the diagnostics.

Note that this should reflect “semantics”, rather than specific span we want to highlight. When rendering the diagnostics into an error message, the IDE will fetch the SyntaxNode and will narrow the span appropriately.

fn as_any(&self) -> &(dyn Any + Send + 'static)[src]

Loading content...

Provided methods

Loading content...

Implementors

Loading content...