Skip to content

Commit 61e0aac

Browse files
committed
Auto merge of rust-lang#114063 - matthiaskrgr:rollup-c90czu6, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - rust-lang#114008 (coverage: Obtain the `__llvm_covfun` section name outside a per-function loop) - rust-lang#114014 (builtin_macros: expect raw strings too) - rust-lang#114043 (docs(LazyLock): add example pass local LazyLock variable to struct) - rust-lang#114051 (Add regression test for invalid "unused const" in method) - rust-lang#114052 (Suggest `{Option,Result}::as_ref()` instead of `cloned()` in some cases) - rust-lang#114058 (Add help for crate arg when crate name is invalid) - rust-lang#114060 (abi: unsized field in union - assert to delay bug ) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 2cc44cf + 0f3a149 commit 61e0aac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/strings.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ impl<'tcx> LateLintPass<'tcx> for StringLitAsBytes {
328328
{
329329
// Don't lint. Byte strings produce `&[u8; N]` whereas `as_bytes()` produces
330330
// `&[u8]`. This change would prevent matching with different sized slices.
331-
} else {
331+
} else if !callsite.starts_with("env!") {
332332
span_lint_and_sugg(
333333
cx,
334334
STRING_LIT_AS_BYTES,

0 commit comments

Comments
 (0)