Post
I wrote a clippy lint for this: coerce_container_to_any
rust-lang.github.ioClippy LintsA collection of lints to catch common mistakes and improve your Rust code.
I think it would be a code smell to do the other thing on purpose, but you could write correct code that did so if you really wanted to, and maybe someone has. Regardless, I agree that warning by default would make a lot of sense. Not sure how to make that happen, though.
0 reposts0 likes