Add support for deferred casting for the invalid_reference_casting lint

This commit is contained in:
Urgau
2023-07-14 22:10:14 +02:00
parent 345d6b816b
commit f3dafe91ff
6 changed files with 83 additions and 35 deletions

View File

@@ -746,7 +746,10 @@ pub enum InvalidFromUtf8Diag {
// reference_casting.rs
#[derive(LintDiagnostic)]
#[diag(lint_invalid_reference_casting)]
pub struct InvalidReferenceCastingDiag;
pub struct InvalidReferenceCastingDiag {
#[label]
pub orig_cast: Option<Span>,
}
// hidden_unicode_codepoints.rs
#[derive(LintDiagnostic)]