We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
env!
1 parent 75df62d commit 516a565Copy full SHA for 516a565
src/tools/clippy/clippy_lints/src/strings.rs
@@ -328,7 +328,7 @@ impl<'tcx> LateLintPass<'tcx> for StringLitAsBytes {
328
{
329
// Don't lint. Byte strings produce `&[u8; N]` whereas `as_bytes()` produces
330
// `&[u8]`. This change would prevent matching with different sized slices.
331
- } else {
+ } else if !callsite.starts_with("env!") {
332
span_lint_and_sugg(
333
cx,
334
STRING_LIT_AS_BYTES,
0 commit comments