various: add rustc_lint_diagnostics to diag fns
The `rustc_lint_diagnostics` attribute is used by the diagnostic translation/struct migration lints to identify calls where non-translatable diagnostics or diagnostics outwith impls are being created. Any function used in creating a diagnostic should be annotated with this attribute so this commit adds the attribute to many more functions. Signed-off-by: David Wood <david.wood@huawei.com>
This commit is contained in:
@@ -357,6 +357,7 @@ impl<'a> DerefMut for SnapshotParser<'a> {
|
||||
}
|
||||
|
||||
impl<'a> Parser<'a> {
|
||||
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
|
||||
pub(super) fn span_err<S: Into<MultiSpan>>(
|
||||
&self,
|
||||
sp: S,
|
||||
@@ -365,6 +366,7 @@ impl<'a> Parser<'a> {
|
||||
err.span_err(sp, self.diagnostic())
|
||||
}
|
||||
|
||||
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
|
||||
pub fn struct_span_err<S: Into<MultiSpan>>(
|
||||
&self,
|
||||
sp: S,
|
||||
|
||||
Reference in New Issue
Block a user