about summary refs log tree commit diff
path: root/src/test/codegen
diff options
context:
space:
mode:
authorPhilip Hayes <philiphayes@fb.com>2021-01-29 22:18:56 -0800
committerPhilip Hayes <philiphayes@fb.com>2021-02-04 11:28:55 -0800
commit7b7e3ca5116983f5485bc9c8a5b2abf490900241 (patch)
treed6be0008e91e1502a4757435a824699b44a6eaed /src/test/codegen
parent357c6a7e2739da8c8d0a68a5e9e0867983af7cbe (diff)
downloadrust-7b7e3ca5116983f5485bc9c8a5b2abf490900241.tar.gz
rust-7b7e3ca5116983f5485bc9c8a5b2abf490900241.zip
Support free functions in disallowed-methods lint
In other words, support:

`disallowed_methods = ["alloc::vec::Vec::new"]` (a free function) in
addition to
`disallowed_methods = ["alloc::vec::Vec::leak"]` (a method).

Improve the documentation to clarify that users must specify the full
qualified path for each disallowed function, which can be confusing for
reexports. Include an example `clippy.toml`.

Simplify the actual lint pass so we can reuse `utils::fn_def_id`.
Diffstat (limited to 'src/test/codegen')
0 files changed, 0 insertions, 0 deletions