Skip to content

Commit 52e3f20

Browse files
authored
Add "all-features = true" to docs.rs metadata for most crates (#12366)
# Objective Fix missing `TextBundle` (and many others) which are present in the main crate as default features but optional in the sub-crate. See: - https://docs.rs/bevy/0.13.0/bevy/ui/node_bundles/index.html - https://docs.rs/bevy_ui/0.13.0/bevy_ui/node_bundles/index.html ~~There are probably other instances in other crates that I could track down, but maybe "all-features = true" should be used by default in all sub-crates? Not sure.~~ (There were many.) I only noticed this because rust-analyzer's "open docs" features takes me to the sub-crate, not the main one. ## Solution Add "all-features = true" to docs.rs metadata for crates that use features. ## Changelog ### Changed - Unified features documented on docs.rs between main crate and sub-crates
1 parent 8eae1d9 commit 52e3f20

File tree

52 files changed

+100
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+100
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2776,3 +2776,4 @@ panic = "abort"
27762776

27772777
[package.metadata.docs.rs]
27782778
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
2779+
all-features = true

crates/bevy_app/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@ web-sys = { version = "0.3", features = ["Window"] }
3434

3535
[lints]
3636
workspace = true
37+
38+
[package.metadata.docs.rs]
39+
all-features = true

crates/bevy_app/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//! This crate is about everything concerning the highest-level, application layer of a Bevy app.
2+
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
23

34
mod app;
45
mod main_schedule;

crates/bevy_asset/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,6 @@ bevy_log = { path = "../bevy_log", version = "0.14.0-dev" }
5959

6060
[lints]
6161
workspace = true
62+
63+
[package.metadata.docs.rs]
64+
all-features = true

crates/bevy_asset/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// FIXME(3492): remove once docs are ready
22
#![allow(missing_docs)]
3+
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
34

45
pub mod io;
56
pub mod meta;

crates/bevy_audio/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,6 @@ android_shared_stdcxx = ["cpal/oboe-shared-stdcxx"]
4949

5050
[lints]
5151
workspace = true
52+
53+
[package.metadata.docs.rs]
54+
all-features = true

crates/bevy_audio/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
//! }
2121
//! ```
2222
#![forbid(unsafe_code)]
23+
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
2324

2425
mod audio;
2526
mod audio_output;

crates/bevy_core/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,6 @@ crossbeam-channel = "0.5.0"
3535

3636
[lints]
3737
workspace = true
38+
39+
[package.metadata.docs.rs]
40+
all-features = true

crates/bevy_core/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//! This crate provides core functionality for Bevy Engine.
2+
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
23

34
mod name;
45
#[cfg(feature = "serialize")]

crates/bevy_core_pipeline/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,6 @@ nonmax = "0.5"
4040

4141
[lints]
4242
workspace = true
43+
44+
[package.metadata.docs.rs]
45+
all-features = true

0 commit comments

Comments
 (0)