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:
commit
db7d8374c1
4 changed files with 64 additions and 39 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue