rust-lang / rust-lang/rust-clippy
False negative of `empty_docs` when processing proc-macros
Open
@andogq is already working on this.
Since Sep 3, 2026.
C-bug
I-false-negative
- Dominant language
- Rust
- Stars
- 13.5k
- Forks
- 2.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 32
Description
Summary
False negative of empty_docs when processing proc-macros.
This issue should be handled with #16317 together.
Lint Name
empty_docs
Reproducer
I tried this code:
// src/lib.rs:
#![warn(clippy::empty_docs)]
#[cxx::bridge]
pub mod ffi {
unsafe extern "C++" {
type R;
///
unsafe fn my_fn(&self);
}
}
pub fn public_my_fn(r: &ffi::R) {
unsafe { r.my_fn() }
}
I expected to see this happen:
warning on empty docs.
Instead, this happened:
nothing.
Version
rustc 1.94.0-nightly (fecb335cb 2026-01-07)
binary: rustc
commit-hash: fecb335cbad3d84ef3da39191ba094e6c726a5b4
commit-date: 2026-01-07
host: x86_64-unknown-linux-gnu
release: 1.94.0-nightly
LLVM version: 21.1.8
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.
Assessment
This issue has not been assessed yet.