Rollup merge of #112517 - fee1-dead-contrib:sus-op-no-borrow, r=compiler-errors

`suspicious_double_ref_op`: don't lint on `.borrow()`

closes #112489
This commit is contained in:
Guillaume Gomez 2023-06-15 22:04:55 +02:00 committed by GitHub
commit db7d8374c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 64 additions and 39 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