NVTX crate fails to compile with rustdoc with `--cfg docsrs`
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 85/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- rust
- Domain
- documentation
Research direction
The failing attribute is at rust/src/lib.rs line 5, where the docsrs cfg enables feature(doc_auto_cfg, doc_cfg). Reproduce first by running RUSTDOCFLAGS="--cfg docsrs" cargo doc inside the rust/ directory, then apply the replacement shown in the issue: enable only doc_cfg as a feature and move auto_cfg into a separate doc(auto_cfg) attribute. Done when that cargo doc command builds the nvtx crate without the E0557 error.
Written by the indexing model from the issue text.
Description
E.g. when running
export RUSTDOCFLAGS="--cfg docsrs"
cargo doc
I get
|
5 | #![cfg_attr(docsrs, feature(doc_auto_cfg, doc_cfg))]
| ^^^^^^^^^^^^ feature has been removed
|
= note: removed in 1.92.0; see <https://github.com/rust-lang/rust/pull/138907> for more information
= note: merged into `doc_cfg`
error: Compilation failed, aborting rustdoc
For more information about this error, try `rustc --explain E0557`.
error: could not document `nvtx`
It seems that the equivalent of
https://github.com/NVIDIA/NVTX/blob/aeda87dd3a913acce29407b6555ddebff98a9e53/rust/src/lib.rs#L5
seems to be now
#![cfg_attr(docsrs, feature(doc_cfg))]
#![cfg_attr(docsrs, doc(auto_cfg))]
- Dominant language
- C++
- Stars
- 573
- Forks
- 87
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from NVIDIA/NVTX
-
`char8_t` build failure in C with GCC 15 and glibc older than 2.36Possibly taken @bdice claimed this 26 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 20/100
-
cudaEvent namingOpen
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
NVTX can't annotate backward process of AI model trainingMay be free again @guysz-nvidia claimed this 712 days ago, and no pull request is open. OpenPython
Similar issues
-
clang:frontend clang:openmp crash
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
llvm/llvm-project#245442 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
ai_p1 comp-sql-syntax
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
ClickHouse/ClickHouse#133888 ·
Maintainers usually reply within 1 day
-
api: firestore
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
firebase/firebase-ios-sdk#17105 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day