about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-01-05 09:54:34 +0000
committerbors <bors@rust-lang.org>2021-01-05 09:54:34 +0000
commita6b72d378f71ed8d2c6849d97571a4c1d8e27afa (patch)
tree7ad9cbc0a7c72571ed4d204852946121bedaab87 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent311186b9bba220a38290b1c888864d7251c30882 (diff)
parentdfa5d7e818c32ea48bc141799276f700ab9d8fb7 (diff)
downloadrust-a6b72d378f71ed8d2c6849d97571a4c1d8e27afa.tar.gz
rust-a6b72d378f71ed8d2c6849d97571a4c1d8e27afa.zip
Auto merge of #6542 - rail-rain:ptr_as_ptr, r=flip1995
Add a new lint `ptr_as_ptr`

This PR adds a new lint `ptr_as_ptr` which checks for `as` casts between raw pointers without changing its mutability and suggest replacing it with `pointer::cast`. Closes #5890.

Open question: should this lint be `pedantic` or `style`? I set it `pedantic` for now because the original post suggests using it, but I think the lint also fits well to `style`.

---

changelog: New lint `ptr_as_ptr`
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions