mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-12 15:04:03 +00:00
Auto merge of #114063 - matthiaskrgr:rollup-c90czu6, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #114008 (coverage: Obtain the `__llvm_covfun` section name outside a per-function loop) - #114014 (builtin_macros: expect raw strings too) - #114043 (docs(LazyLock): add example pass local LazyLock variable to struct) - #114051 (Add regression test for invalid "unused const" in method) - #114052 (Suggest `{Option,Result}::as_ref()` instead of `cloned()` in some cases) - #114058 (Add help for crate arg when crate name is invalid) - #114060 (abi: unsized field in union - assert to delay bug ) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
61e0aac615
@ -328,7 +328,7 @@ impl<'tcx> LateLintPass<'tcx> for StringLitAsBytes {
|
||||
{
|
||||
// Don't lint. Byte strings produce `&[u8; N]` whereas `as_bytes()` produces
|
||||
// `&[u8]`. This change would prevent matching with different sized slices.
|
||||
} else {
|
||||
} else if !callsite.starts_with("env!") {
|
||||
span_lint_and_sugg(
|
||||
cx,
|
||||
STRING_LIT_AS_BYTES,
|
||||
|
Loading…
Reference in New Issue
Block a user