-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't haveL-restrictionLint: Belongs in the restriction lint groupLint: Belongs in the restriction lint group
Description
Summary
While upgrading to Rust 1.88.0 I tried using cargo clippy --fix
, and suddenly couldn't compile anymore due to the issue described down below.
I sadly do not have the time to write a fully compiling minimal example (sorry 🥲), but I can provide the snippet.
The macro in question here comes from tracing_attributes
version 0.1.26
.
Lint Name
needless_raw_strings
Reproducer
I tried this code:
impl MyType {
#[instrument(name = "run_event_machine", skip(self))]
fn run(&mut self) {
...
I saw this happen:
error: unnecessary raw string literal
--> src/queries/events/event_machine.rs:166:8
|
166 | fn run(&mut self) {
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_strings
= note: `-D clippy::needless-raw-strings` implied by `-D clippy::restriction`
= help: to override `-D clippy::restriction` add `#[allow(clippy::needless_raw_strings)]`
help: use a plain string literal instead
|
166 - fn run(&mut self) {
166 + fn un(&mut self) {
|
I expected to see this happen:
Nothing. This is a method.
Version
rustc 1.88.0 (6b00bc388 2025-06-23)
binary: rustc
commit-hash: 6b00bc3880198600130e1cf62b8f8a93494488cc
commit-date: 2025-06-23
host: x86_64-unknown-linux-gnu
release: 1.88.0
LLVM version: 20.1.5
Additional Labels
No response
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't haveL-restrictionLint: Belongs in the restriction lint groupLint: Belongs in the restriction lint group