Move bsn! macro docs back into macro crate, avoiding re-re-export issues#24828
Open
laundmo wants to merge 2 commits into
Open
Move bsn! macro docs back into macro crate, avoiding re-re-export issues#24828laundmo wants to merge 2 commits into
laundmo wants to merge 2 commits into
Conversation
…ix rust-analyzer preferring module of same name
cookie1170
approved these changes
Jul 1, 2026
Contributor
|
Will need to fix some broken doc links as mentioned by CI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
bsn!from the macro crate into bevy_scene. This was then implemented as part of bsn: improve docs and add tests #24464bsn!appear just fine when viewingbevy_scenebut not when viewingbevy::scene. Related rustdoc issues: Documentation of a re-export doesn't appear on level-two re-export rust-lang/rust#81893 Re-export from external crate not documented rust-lang/rust#51783 Re-exports of hidden items are inconsistent rust-lang/rust#137342Solution
doc(hidden)anddoc(inline)attributesbevy_scene_macros::bsnto_bsnto avoid Rust-Analyzer preferring the module over the macro (Macro import with same name as private module uses module syntax highlighting rust-lang/rust-analyzer#19421). This is done without renaming the folder to avoid diffs.Testing
cargo doc --lib --config 'build.rustflags=["--cfg", "docsrs_dep"]' -Zhost-config -Ztarget-applies-to-host --config 'host.rustflags=["--cfg", "docsrs_dep"]' --config 'build.rustdocflags=["-Zunstable-options", "--generate-link-to-definition", "--generate-macro-expansion", "--html-after-content", "./docs-rs/trait-tags.html"]' --no-deps -p bevy --all-featureswhich approximately matches what docs.rs would run. Did this once with
-p bevyand once with-p bevy_scene, both show the macro docs.Fixes #24703
Closes #24750
Closes #24820