-
Notifications
You must be signed in to change notification settings - Fork 2k
False positive for 'string_lit_as_bytes' in conjunction with 'env!' #5619
Copy link
Copy link
Closed
rust-lang/rust
#72637Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingE-needs-testCall for participation: writing testsCall for participation: writing testsI-suggestion-causes-errorIssue: The suggestions provided by this Lint cause an ICE/error when appliedIssue: The suggestions provided by this Lint cause an ICE/error when appliedT-macrosType: Issues with macros and macro expansionType: Issues with macros and macro expansiongood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingE-needs-testCall for participation: writing testsCall for participation: writing testsI-suggestion-causes-errorIssue: The suggestions provided by this Lint cause an ICE/error when appliedIssue: The suggestions provided by this Lint cause an ICE/error when appliedT-macrosType: Issues with macros and macro expansionType: Issues with macros and macro expansiongood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Type
Fields
Give feedbackNo fields configured for issues without a type.
Hello all, I've found a false positive for a lint:
clippy 0.0.212 (7ebd87a7a 2020-05-08)A binary literal can't be used with the env! macro and the suggestion to fix it obviously doesn't work. In this case I would say that calling
as_bytes()is the proper thing to do.I've tested whether or not this is a general macro problem, but that doesn't seem to be the case: