about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorTrevor Gross <t.gross35@gmail.com>2024-08-24 21:03:31 -0500
committerGitHub <noreply@github.com>2024-08-24 21:03:31 -0500
commit198a68df1ceba3817c5a19c0451e8ddf74690060 (patch)
treeb7fdee2d4021755bff45ebb3ebae1a04c422b52c /compiler/rustc_codegen_llvm/src
parentdfe7d5c31e51d61c866a294393e4d839d4b42131 (diff)
parentb335ec9ec8d1132efee4e900a1c173efc7f4a357 (diff)
downloadrust-198a68df1ceba3817c5a19c0451e8ddf74690060.tar.gz
rust-198a68df1ceba3817c5a19c0451e8ddf74690060.zip
Rollup merge of #128735 - jieyouxu:pr-120176-revive, r=cjgillot
Add a special case for `CStr`/`CString` in the `improper_ctypes` lint

Revives #120176. Just needed to bless a test and fix an argument, but seemed reasonable to me otherwise.

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`.

The suggestion is not made for `&mut CString` or `*mut CString`.

r? ``````@cjgillot`````` (since you were the reviewer of the original PR #120176, but feel free to reroll)
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions