Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improper_ctypes lint should cover "C" abi function pointer types. #95683

Closed
crlf0710 opened this issue Apr 5, 2022 · 0 comments · Fixed by #130669
Closed

improper_ctypes lint should cover "C" abi function pointer types. #95683

crlf0710 opened this issue Apr 5, 2022 · 0 comments · Fixed by #130669
Labels
A-FFI Area: Foreign function interface (FFI) A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. C-bug Category: This is a bug. L-improper_ctypes_definitions Lint: improper_ctypes_definitions T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@crlf0710
Copy link
Member

crlf0710 commented Apr 5, 2022

I tried this code:

pub type F = extern "C" fn(&[u8]);

I expected to see this happen: improper_ctypes should trigger for this definition.

Instead, this happened: It is not linted.

@crlf0710 crlf0710 added A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-FFI Area: Foreign function interface (FFI) labels Apr 5, 2022
@workingjubilee workingjubilee added A-ABI Area: Concerning the application binary interface (ABI) and removed A-ABI Area: Concerning the application binary interface (ABI) labels Jul 1, 2022
@jieyouxu jieyouxu added the L-improper_ctypes Lint: improper_ctypes label May 13, 2024
@jieyouxu jieyouxu added L-improper_ctypes_definitions Lint: improper_ctypes_definitions and removed L-improper_ctypes Lint: improper_ctypes labels Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-FFI Area: Foreign function interface (FFI) A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. C-bug Category: This is a bug. L-improper_ctypes_definitions Lint: improper_ctypes_definitions T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants