do not use stringly typed diagnostics

This commit is contained in:
Deadbeef
2023-06-11 08:18:56 +00:00
parent 1e36f7e9ae
commit 1caed51673
3 changed files with 31 additions and 26 deletions

View File

@@ -1231,11 +1231,15 @@ pub struct NoopMethodCallDiag<'a> {
}
#[derive(LintDiagnostic)]
#[diag(lint_suspicious_double_ref_op)]
pub struct SuspiciousDoubleRefDiag<'a> {
pub call: Symbol,
#[diag(lint_suspicious_double_ref_deref)]
pub struct SuspiciousDoubleRefDerefDiag<'a> {
pub ty: Ty<'a>,
}
#[derive(LintDiagnostic)]
#[diag(lint_suspicious_double_ref_clone)]
pub struct SuspiciousDoubleRefCloneDiag<'a> {
pub ty: Ty<'a>,
pub op: &'static str,
}
// pass_by_value.rs