A clippy lint to warn on default match binding modes

Default binding modes do not only apply in match expressions. But anyway, type-based reasoning about references seems extremely basic and equally important to me, since references and values behave very differently.

I also don't see why we should only focus on safe code; the problem with not knowing whether something is a value or a reference seems even more pronounced to me in the context of unsafe code.

For example, these.

4 Likes