Macros§

  • forward 🔒
    DiagnosticBuilder impls DerefMut, which allows access to the fields and methods of the embedded Diagnostic. However, that doesn’t allow method chaining at the DiagnosticBuilder level. Each use of this macro defines two builder methods at that level, both of which wrap the equivalent method in Diagnostic.

Structs§

  • Marker type which enables implementation of create_bug and emit_bug functions for bug diagnostics.
  • Used for emitting structured error messages and other diagnostic information. Each constructed DiagnosticBuilder must be consumed by a function such as emit, cancel, delay_as_bug, or into_diagnostic. A panic occurrs if a DiagnosticBuilder is dropped without being consumed by one of these functions.
  • Marker type which enables implementation of create_fatal and emit_fatal functions for fatal diagnostics.

Traits§

  • Trait for types that DiagnosticBuilder::emit can return as a “guarantee” (or “proof”) token that the emission happened.
  • Trait implemented by error types. This is rarely implemented manually. Instead, use #[derive(Diagnostic)] – see rustc_macros::Diagnostic.