You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The x@foo construct cannot be used in a match arm if foo contains sub-bindings. This is not surprising. However, when the sub-bindings are actually _, this should be allowed as _ is not a real binding.
Check usages in `ptr_arg`
fixesrust-lang#214fixesrust-lang#1981fixesrust-lang#3381fixesrust-lang#6406fixesrust-lang#6964
This does not take into account the return type of the function currently, so `(&Vec<_>) -> &Vec<_>` functions may still be false positives.
The name given for the type also has to match the real type name, so `type Foo = Vec<u32>` won't trigger the lint, but `type Vec = Vec<u32>` will. I'm not sure if this is the best way to handle this, or if a note about the actual type should be added instead.
changelog: Check if the argument is used in a way which requires the original type in `ptr_arg`
changelog: Lint mutable references in `ptr_arg`
The
x@foo
construct cannot be used in a match arm iffoo
contains sub-bindings. This is not surprising. However, when the sub-bindings are actually_
, this should be allowed as_
is not a real binding.Example:
Result:
The text was updated successfully, but these errors were encountered: