1
Fork 0

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

@ -479,13 +479,11 @@ lint_requested_level = requested on the command line with `{$level} {$lint_name}
lint_supertrait_as_deref_target = `{$t}` implements `Deref` with supertrait `{$target_principal}` as target
.label = target type is set here
lint_suspicious_double_ref_op =
using `.{$call}()` on a double reference, which returns `{$ty}` instead of {$op ->
*[should_not_happen] [{$op}]
[deref] dereferencing
[borrow] borrowing
[clone] cloning
} the inner type
lint_suspicious_double_ref_clone =
using `.clone()` on a double reference, which returns `{$ty}` instead of cloning the inner type
lint_suspicious_double_ref_deref =
using `.deref()` on a double reference, which returns `{$ty}` instead of dereferencing the inner type
lint_trivial_untranslatable_diag = diagnostic with static strings only