]> git.lizzy.rs Git - rust.git/commit
Corrected suggestion for generic parameters in `function_item_references` lint
authorAyrton <a.munoz3327@gmail.com>
Mon, 2 Nov 2020 03:14:21 +0000 (23:14 -0400)
committerAyrton <a.munoz3327@gmail.com>
Mon, 2 Nov 2020 03:50:17 +0000 (23:50 -0400)
commitace02c40f0d5970c46aaee74f7ee2fb27480c783
treea840775c10370f8a147675774852f3b8766f7fe5
parent3d0682b97a3a03bcf54337b56002fb6b2b0ce244
Corrected suggestion for generic parameters in `function_item_references` lint

This lint was incorrectly suggesting casting a function to a pointer without
specifying generic type parameters or const generics. This would cause a
compiler error since the missing parameters couldn't be inferred. This commit
fixed the suggestion and added a few tests with generics.
compiler/rustc_mir/src/transform/function_item_references.rs
src/test/ui/lint/function-item-references.rs
src/test/ui/lint/function-item-references.stderr