`rustc_has_incoherent_impl` breaks rustdoc in subtle ways
Open
@clarfonthey is already working on this.
Since Aug 27, 2026.
C-bug
I-prioritize
needs-triage
regression-untriaged
S-has-bisection
T-rustdoc
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Code
I tried this code:
/// [`std::io::Error::last_os_error`]
pub struct Strukt;
I expected to see this happen: cargo doc finishes without warnings.
Instead, this happened:
warning: unresolved link to `std::io::Error::last_os_error`
--> dep/src/lib.rs:3:7
|
3 | /// [`std::io::Error::last_os_error`].
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the struct `Error` has no field or associated item named `last_os_error`
|
= note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
warning: `dep` (lib doc) generated 1 warning
Version it worked on
It most recently worked on: 1.97
Version with regression
rustc --version --verbose:
rustc 1.98.0 (88d9e12ae 2026-08-18)
binary: rustc
commit-hash: 88d9e12ae178fab0fb5cc050a94da85685d449ea
commit-date: 2026-08-18
host: x86_64-unknown-linux-gnu
release: 1.98.0
LLVM version: 22.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.