-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Closed
Labels
A-CLIArea: Command-line interface (CLI) to the compilerArea: Command-line interface (CLI) to the compilerA-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-doctestsArea: Documentation tests, run by rustdocArea: Documentation tests, run by rustdocC-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Description
I tried this code:
// lib.rs
#[rapx::tag]
fn f() {}
# ✅ This compiles and generates doc/
$ rustdoc lib.rs -Zcrate-attr="feature(register_tool)" -Zcrate-attr="register_tool(rapx)"
# 💥This doesn't compile
$ rustdoc --test lib.rs -Zcrate-attr="feature(register_tool)" -Zcrate-attr="register_tool(rapx)"
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `rapx`
--> lib.rs:1:3
|
1 | #[rapx::tag]
| ^^^^ use of unresolved module or unlinked crate `rapx`
I expected to see this happen: rust --test
will recognize register_tool as rustdoc
does.
Instead, this happened: rust --test
doesn't recognize register_tool.
Meta
rustc --version --verbose
:
rustc 1.89.0-nightly (45acf54ee 2025-06-16)
binary: rustc
commit-hash: 45acf54eea118ed27927282b5e0bfdcd80b7987c
commit-date: 2025-06-16
host: aarch64-unknown-linux-gnu
release: 1.89.0-nightly
LLVM version: 20.1.5
Metadata
Metadata
Assignees
Labels
A-CLIArea: Command-line interface (CLI) to the compilerArea: Command-line interface (CLI) to the compilerA-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-doctestsArea: Documentation tests, run by rustdocArea: Documentation tests, run by rustdocC-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Type
Projects
Status
Done