Confusing new warning suspicious_double_ref_op in beta 1.71.0 #112489
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
P-medium
Medium priority
regression-from-stable-to-beta
Performance or correctness regression from stable to beta.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone
Code
Current output
Desired output
Compiling borrow v0.1.0 (/tmp/borrow) Finished dev [unoptimized + debuginfo] target(s) in 0.20s
Rationale and extra context
If I have a type
S
, and a traitT
that is implemented for bothS
and&S
,s.borrow()
is a valid way to get a reference&S
from an object of typeS
. But since beta 1.71, this emits a warning. I have no idea what the warning is trying to convey, what "double reference" is referring to, or what "the inner type" is.Other cases
No response
Anything else?
The text was updated successfully, but these errors were encountered: