Struct proc_macro_error::Diagnostic [−][src]
pub struct Diagnostic { /* fields omitted */ }
Expand description
Represents a single diagnostic message
Implementations
Create a new diagnostic message that points to Span::call_site()
Create a new diagnostic message that points to the span
Add another error message to self such that it will be emitted right after the main message.
Attach a “help” note to your main message, the note will have it’s own span on nightly.
Span
The span is ignored on stable, the note effectively inherits its parent’s (main message) span
Attach a note to your main message, the note will have it’s own span on nightly.
Span
The span is ignored on stable, the note effectively inherits its parent’s (main message) span
Abort the proc-macro’s execution and display the diagnostic.
Warnings
Warnings are not emitted on stable and beta, but this function will abort anyway.
Trait Implementations
Create a new diagnostic message that points to the span_range
. Read more
Add another error message to self such that it will be emitted right after the main message. Read more
Attach a “help” note to your main message, the note will have it’s own span on nightly. Read more
Attach a note to your main message, the note will have it’s own span on nightly. Read more
Auto Trait Implementations
impl RefUnwindSafe for Diagnostic
impl !Send for Diagnostic
impl !Sync for Diagnostic
impl Unpin for Diagnostic
impl UnwindSafe for Diagnostic
Blanket Implementations
Mutably borrows from an owned value. Read more
Returns a Span
covering the complete contents of this syntax tree
node, or Span::call_site()
if this node is empty. Read more