Allow 'error make' to make simple errors (#4881)

* Allow 'error make' to make simple errors

* Add example
This commit is contained in:
JT
2022-03-20 16:25:45 +13:00
committed by GitHub
parent d5f23ab592
commit e6a5011fdb
2 changed files with 20 additions and 5 deletions

View File

@ -315,6 +315,9 @@ Either make sure {0} is a string, or add a 'to_string' entry for it in ENV_CONVE
#[diagnostic(help("{1}"))]
LabeledError(String, String),
#[error("{0}")]
UnlabeledError(String),
#[error("{1}")]
#[diagnostic()]
OutsideSpannedLabeledError(#[source_code] String, String, String, #[label("{2}")] Span),