about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-01-21 15:43:57 +0000
committerbors <bors@rust-lang.org>2022-01-21 15:43:57 +0000
commit4992548f281c54c85079cd07abdfc717b7c2bd01 (patch)
tree9603da63ab3bef1000b45dd817225e132ab30d85 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parentf4709e6f1d57f13a44fc2654f7e0fb7968b20d4b (diff)
parent048297b5b265188ca9864d410a8bebb090e2f5ba (diff)
downloadrust-4992548f281c54c85079cd07abdfc717b7c2bd01.tar.gz
rust-4992548f281c54c85079cd07abdfc717b7c2bd01.zip
Auto merge of #8271 - Jarcho:ptr_arg_214, r=flip1995
Check usages in `ptr_arg`

fixes #214
fixes #1981
fixes #3381
fixes #6406
fixes #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`
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions