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

Add a special case for CStr/CString in the improper_ctypes lint #128735

Merged
merged 1 commit into from
Aug 25, 2024

Commits on Aug 6, 2024

  1. Add a special case for CStr/CString in the improper_ctypes lint

    Instead of saying to "consider adding a `#[repr(C)]` or
    `#[repr(transparent)]` attribute to this struct", we now tell users to
    "Use `*const ffi::c_char` instead, and pass the value from
    `CStr::as_ptr()`" when the type involved is a `CStr` or a `CString`.
    
    Co-authored-by: Jieyou Xu <jieyouxu@outlook.com>
    Flying-Toast and jieyouxu committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    b335ec9 View commit details
    Browse the repository at this point in the history