rust-lang / rust-lang/rust-clippy
error: expected identifier, found `$`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 13.5k
- Forks
- 2.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 32
Description
Summary
Due to the following errors were reported:
error: expected identifier, found `$`
--> src/common/orders_pool/pools/orders_pool_processor.rs:101:25
|
101 | use $crate::__macro_support::Callsite as _;
| ^ expected identifier
I cannot apply cargo clippy --fix
The problem is under tracing-0.1.41/src/macros.rs:
use $crate::__macro_support::Callsite as _;
Reproducer
I tried this code:
tracing::error!(
"Error during order pool creation: {:?}",
error
)
I expected to see this happen: cargo clippy --fix will work as expected
Instead, this happened:
error: expected identifier, found `$`
--> src/common/orders_pool/pools/orders_pool_processor.rs:101:25
|
101 | use $crate::__macro_support::Callsite as _;
| ^ expected identifier
Version
rustc 1.86.0 (05f9846f8 2025-03-31)
binary: rustc
commit-hash: 05f9846f893b09a1be1fc8560e33fc3c815cfecb
commit-date: 2025-03-31
host: aarch64-apple-darwin
release: 1.86.0
LLVM version: 19.1.7
Additional Labels
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with the reported tracing::error! call and cargo clippy --fix using the listed Rust version. Inspect tracing-0.1.41/src/macros.rs and the generated location in src/common/orders_pool/pools/orders_pool_processor.rs:101. Done means cargo clippy --fix no longer reports the unexpected $ identifier error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100