-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Confusing new warning suspicious_double_ref_op in beta 1.71.0 #112489
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsP-mediumMedium priorityMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Milestone
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsP-mediumMedium priorityMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Code
Current output
Desired output
Compiling borrow v0.1.0 (/tmp/borrow) Finished dev [unoptimized + debuginfo] target(s) in 0.20sRationale and extra context
If I have a type
S, and a traitTthat is implemented for bothSand&S,s.borrow()is a valid way to get a reference&Sfrom 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?