You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current derive macro supports code, help, and derive, but doesn't really handle the snippet part of miette. Extend the macro so that you can write stuff like this:
#[derive(Debug,Error,Diagnostic)]#[diagnostic(code(math::bad_arithmetic))]#[error("Tried to add a {bad_type} to a {good_type}")]pubstructMyErr{good_type:Type,bad_type:Type,bad_var:Var,src:PathBuf,// The overall span of code that will be rendered.#[context(src,"This region is where things went wrong")]ctx:SourceSpan,// A highlight (basically something to underline)#[highlight(ctx,"This is a {bad_type}")]bad_var_span:SourceSpan,// Can have multiple highlights.#[highlight(ctx,"This is a {good_type}")]good_var_span:SourceSpan,}
The text was updated successfully, but these errors were encountered:
The current derive macro supports
code
,help
, andderive
, but doesn't really handle thesnippet
part of miette. Extend the macro so that you can write stuff like this:The text was updated successfully, but these errors were encountered: