[][src]Trait ra_ap_hir::diagnostics::Diagnostic

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

Required methods

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

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

pub 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.

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

Loading content...

Provided methods

pub fn is_experimental(&self) -> bool[src]

Loading content...

Implementations on Foreign Types

impl Diagnostic for UnresolvedImport[src]

impl Diagnostic for UnresolvedExternCrate[src]

impl Diagnostic for MacroError[src]

impl Diagnostic for MissingUnsafe[src]

impl Diagnostic for BreakOutsideOfLoop[src]

impl Diagnostic for MissingPatFields[src]

Loading content...

Implementors

impl Diagnostic for InactiveCode[src]

impl Diagnostic for IncorrectCase[src]

impl Diagnostic for MismatchedArgCount[src]

impl Diagnostic for MissingFields[src]

impl Diagnostic for MissingMatchArms[src]

impl Diagnostic for MissingOkInTailExpr[src]

impl Diagnostic for NoSuchField[src]

impl Diagnostic for RemoveThisSemicolon[src]

impl Diagnostic for UnresolvedModule[src]

impl Diagnostic for UnresolvedProcMacro[src]

Loading content...