about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/errors.rs
diff options
context:
space:
mode:
authorFlying-Toast <38232168+Flying-Toast@users.noreply.github.com>2024-03-23 10:49:05 -0400
committer许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com>2024-08-06 13:56:59 +0000
commitb335ec9ec8d1132efee4e900a1c173efc7f4a357 (patch)
treecb0683b9e2c6672f3a079c4b54e55ac5693e9604 /compiler/rustc_codegen_llvm/src/errors.rs
parent93ea767e2928589b74296ba85b57d80e108db712 (diff)
downloadrust-b335ec9ec8d1132efee4e900a1c173efc7f4a357.tar.gz
rust-b335ec9ec8d1132efee4e900a1c173efc7f4a357.zip
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>
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions