about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/errors.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-02-05 18:15:52 +0000
committerbors <bors@rust-lang.org>2024-02-05 18:15:52 +0000
commit005b6c2424b8513ac9b8894c6a3009a837a38b80 (patch)
treee5726e4529757eaaeb763e40a78998e5bc2b2bfb /compiler/rustc_codegen_llvm/src/errors.rs
parent8baeb26754cd64baf7833b66ef5cf3f552911306 (diff)
parent7f80b449f570613aea32f30f64ec5bb3189e1d26 (diff)
downloadrust-005b6c2424b8513ac9b8894c6a3009a837a38b80.tar.gz
rust-005b6c2424b8513ac9b8894c6a3009a837a38b80.zip
Auto merge of #11919 - y21:manual_c_str_literals, r=xFrednet
new lint: `manual_c_str_literals`

With rust-lang/rust#117472 merged and `c""` syntax stabilized, I think it'd be nice to have a lint for using `CStr::from_ptr` (and similar constructors) with a string literal as an argument.
We can probably also lint `"foo\0".as_ptr()` and suggest `c"foo".as_ptr()`. I might add that to this PR tomorrow if I find the time.

The byte string literal to c string literal rewriting is ugly but oh well.

changelog: new lint: `manual_c_str_literals`
[#11919](https://github.com/rust-lang/rust-clippy/pull/11919)
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions