diff options
| author | Trevor Gross <t.gross35@gmail.com> | 2024-08-24 21:03:31 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-24 21:03:31 -0500 |
| commit | 198a68df1ceba3817c5a19c0451e8ddf74690060 (patch) | |
| tree | b7fdee2d4021755bff45ebb3ebae1a04c422b52c /compiler/rustc_codegen_llvm/src | |
| parent | dfe7d5c31e51d61c866a294393e4d839d4b42131 (diff) | |
| parent | b335ec9ec8d1132efee4e900a1c173efc7f4a357 (diff) | |
| download | rust-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
