]> git.lizzy.rs Git - rust.git/commit
Auto merge of #6608 - rail-rain:note_on_as_conversions, r=phansch
authorbors <bors@rust-lang.org>
Tue, 19 Jan 2021 08:01:56 +0000 (08:01 +0000)
committerbors <bors@rust-lang.org>
Tue, 19 Jan 2021 08:01:56 +0000 (08:01 +0000)
commite21270ba0e26a4807b74433719e5e3e9641bb8cf
tree1e01ac992bdace33ac3c42e86821d884d8dfad1e
parentab1020b16204478617174d9e3b3bd78e7c4b3ff7
parentc53192c34762f8104542168dbc7c83cdd280151c
Auto merge of #6608 - rail-rain:note_on_as_conversions, r=phansch

Add a note to `as_conversions`

I have seen a couple of examples where there are some misunderstandings of `as_conversions` ([1](https://github.com/rust-lang/rust-clippy/issues/5890#issuecomment-671852546), [2](https://github.com/rust-lang/rust-clippy/issues/6116#issuecomment-704251710) and [3](https://github.com/rust-lang/rust-clippy/issues/6428)). This PR adds the note that explains its purpose and relationship with other `as` related casts. Open question: should I list every related lints for discoverbility, or just suggest how to find these? I chose the former because there's no way to list only and all `as` related lints (e.g. on All the Clippt Lints, 'cast' includes some noises, but `cast_` excludes some) even though I cannot guarantee the list will be updated to include future changes.

---

changelog: Add a note to the document of `as_conversions`