Nightly Rust suggests .as_ref()
on the left-hand side of the assignment
#114925
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
P-medium
Medium priority
regression-from-stable-to-nightly
Performance or correctness regression from stable to nightly.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
Playground link: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=6f5723a2dea54642823935b3683d3480
Anything else?
That’s a regression from stable to nightly. Playground’s stable (1.71.1) gives the desired output, but playground’s nightly (1.73.0-nightly (2023-08-16 07438b0)) does not.
The text was updated successfully, but these errors were encountered: