Conflict between pattern_type_mismatch
and ref_patterns
#14690
Labels
C-bug
Category: Clippy is not doing the correct thing
Summary
With the
pattern_type_mismatch
andref_patterns
lints both enabled, you can get stuck in a situation where you are told:If you're using the reproduction code given below, this both options will initially lead to:
cannot move `String` out of reference
You can prefix the internal variables with
ref
to fix this, which leads to:Reproducer
I tried this code:
I expected to see this happen:
No warning, or a config to allow it in this context.
Instead, this happened:
When using
&
is not valid in this context.Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: