diff --git a/Cargo.toml b/Cargo.toml index fd61ba79853ba..348e939f008db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ keywords = ["game", "engine", "gamedev", "graphics", "bevy"] license = "MIT OR Apache-2.0" repository = "https://github.com/bevyengine/bevy" documentation = "https://docs.rs/bevy" -rust-version = "1.82.0" +rust-version = "1.83.0" [workspace] exclude = [ diff --git a/crates/bevy_app/src/lib.rs b/crates/bevy_app/src/lib.rs index aac1cfddff875..c7dd7414aab80 100644 --- a/crates/bevy_app/src/lib.rs +++ b/crates/bevy_app/src/lib.rs @@ -1,5 +1,10 @@ -// `rustdoc_internals` is needed for `#[doc(fake_variadics)]` -#![allow(internal_features)] +#![cfg_attr( + any(docsrs, docsrs_dep), + expect( + internal_features, + reason = "rustdoc_internals is needed for fake_variadic" + ) +)] #![cfg_attr(any(docsrs, docsrs_dep), feature(doc_auto_cfg, rustdoc_internals))] #![forbid(unsafe_code)] #![doc( diff --git a/crates/bevy_asset/macros/src/lib.rs b/crates/bevy_asset/macros/src/lib.rs index 901afd4c48aae..443bd09ab9b36 100644 --- a/crates/bevy_asset/macros/src/lib.rs +++ b/crates/bevy_asset/macros/src/lib.rs @@ -1,5 +1,4 @@ -// FIXME(15321): solve CI failures, then replace with `#![expect()]`. -#![allow(missing_docs, reason = "Not all docs are written yet, see #3492.")] +#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")] #![cfg_attr(docsrs, feature(doc_auto_cfg))] use bevy_macro_utils::BevyManifest; diff --git a/crates/bevy_asset/src/lib.rs b/crates/bevy_asset/src/lib.rs index d252946c3c186..21e976179e8e7 100644 --- a/crates/bevy_asset/src/lib.rs +++ b/crates/bevy_asset/src/lib.rs @@ -138,9 +138,7 @@ //! If you want to save your assets back to disk, you should implement [`AssetSaver`](saver::AssetSaver) as well. //! This trait mirrors [`AssetLoader`] in structure, and works in tandem with [`AssetWriter`](io::AssetWriter), which mirrors [`AssetReader`](io::AssetReader). -// FIXME(3492): remove once docs are ready -// FIXME(15321): solve CI failures, then replace with `#![expect()]`. -#![allow(missing_docs, reason = "Not all docs are written yet, see #3492.")] +#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")] #![cfg_attr(docsrs, feature(doc_auto_cfg))] #![doc( html_logo_url = "https://bevyengine.org/assets/icon.png", diff --git a/crates/bevy_core_pipeline/src/lib.rs b/crates/bevy_core_pipeline/src/lib.rs index 731b50a7576ea..e94daa90f4bdc 100644 --- a/crates/bevy_core_pipeline/src/lib.rs +++ b/crates/bevy_core_pipeline/src/lib.rs @@ -1,5 +1,4 @@ -// FIXME(15321): solve CI failures, then replace with `#![expect()]`. -#![allow(missing_docs, reason = "Not all docs are written yet, see #3492.")] +#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")] #![forbid(unsafe_code)] #![cfg_attr(docsrs, feature(doc_auto_cfg))] #![doc( diff --git a/crates/bevy_derive/src/lib.rs b/crates/bevy_derive/src/lib.rs index a18e7cbd427c8..2636ffc57d13f 100644 --- a/crates/bevy_derive/src/lib.rs +++ b/crates/bevy_derive/src/lib.rs @@ -1,5 +1,4 @@ -// FIXME(15321): solve CI failures, then replace with `#![expect()]`. -#![allow(missing_docs, reason = "Not all docs are written yet, see #3492.")] +#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")] #![forbid(unsafe_code)] #![cfg_attr(docsrs, feature(doc_auto_cfg))] #![doc( diff --git a/crates/bevy_diagnostic/src/lib.rs b/crates/bevy_diagnostic/src/lib.rs index 5db2c188b8666..e030dde797044 100644 --- a/crates/bevy_diagnostic/src/lib.rs +++ b/crates/bevy_diagnostic/src/lib.rs @@ -1,5 +1,4 @@ -// FIXME(15321): solve CI failures, then replace with `#![expect()]`. -#![allow(missing_docs, reason = "Not all docs are written yet, see #3492.")] +#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")] #![cfg_attr(docsrs, feature(doc_auto_cfg))] #![forbid(unsafe_code)] #![doc( diff --git a/crates/bevy_ecs/macros/src/lib.rs b/crates/bevy_ecs/macros/src/lib.rs index 61774882b8973..0d4103d890399 100644 --- a/crates/bevy_ecs/macros/src/lib.rs +++ b/crates/bevy_ecs/macros/src/lib.rs @@ -1,5 +1,4 @@ -// FIXME(15321): solve CI failures, then replace with `#![expect()]`. -#![allow(missing_docs, reason = "Not all docs are written yet, see #3492.")] +#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")] #![cfg_attr(docsrs, feature(doc_auto_cfg))] extern crate proc_macro; diff --git a/crates/bevy_ecs/src/lib.rs b/crates/bevy_ecs/src/lib.rs index a4eba6880e960..aa28a10df7bda 100644 --- a/crates/bevy_ecs/src/lib.rs +++ b/crates/bevy_ecs/src/lib.rs @@ -3,8 +3,13 @@ // TODO: remove once Edition 2024 is released #![allow(dependency_on_unit_never_type_fallback)] #![doc = include_str!("../README.md")] -// `rustdoc_internals` is needed for `#[doc(fake_variadics)]` -#![allow(internal_features)] +#![cfg_attr( + any(docsrs, docsrs_dep), + expect( + internal_features, + reason = "rustdoc_internals is needed for fake_variadic" + ) +)] #![cfg_attr(any(docsrs, docsrs_dep), feature(doc_auto_cfg, rustdoc_internals))] #![allow(unsafe_code)] #![doc( diff --git a/crates/bevy_encase_derive/src/lib.rs b/crates/bevy_encase_derive/src/lib.rs index 9d924bb9ff5cd..0432d161f0a6b 100644 --- a/crates/bevy_encase_derive/src/lib.rs +++ b/crates/bevy_encase_derive/src/lib.rs @@ -1,5 +1,4 @@ -// FIXME(15321): solve CI failures, then replace with `#![expect()]`. -#![allow(missing_docs, reason = "Not all docs are written yet, see #3492.")] +#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")] #![forbid(unsafe_code)] #![cfg_attr(docsrs, feature(doc_auto_cfg))] #![doc( diff --git a/crates/bevy_image/src/lib.rs b/crates/bevy_image/src/lib.rs index ce2e932826067..2952bcec7cfeb 100644 --- a/crates/bevy_image/src/lib.rs +++ b/crates/bevy_image/src/lib.rs @@ -1,5 +1,4 @@ -// FIXME(15321): solve CI failures, then replace with `#![expect()]`. -#![allow(missing_docs, reason = "Not all docs are written yet, see #3492.")] +#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")] #![allow(unsafe_code)] pub mod prelude { diff --git a/crates/bevy_math/src/lib.rs b/crates/bevy_math/src/lib.rs index 1d99edd051566..a276111c9d500 100644 --- a/crates/bevy_math/src/lib.rs +++ b/crates/bevy_math/src/lib.rs @@ -1,5 +1,11 @@ #![forbid(unsafe_code)] -#![allow(internal_features)] +#![cfg_attr( + any(docsrs, docsrs_dep), + expect( + internal_features, + reason = "rustdoc_internals is needed for fake_variadic" + ) +)] #![cfg_attr(any(docsrs, docsrs_dep), feature(rustdoc_internals))] #![cfg_attr(docsrs, feature(doc_auto_cfg))] #![doc( diff --git a/crates/bevy_mesh/src/lib.rs b/crates/bevy_mesh/src/lib.rs index 110a46b76f899..83bc30df3518b 100644 --- a/crates/bevy_mesh/src/lib.rs +++ b/crates/bevy_mesh/src/lib.rs @@ -1,6 +1,4 @@ -// FIXME(15321): solve CI failures, then replace with `#![expect()]`. -#![allow(missing_docs, reason = "Not all docs are written yet, see #3492.")] -#![allow(unsafe_code)] +#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")] extern crate alloc; extern crate core; diff --git a/crates/bevy_mikktspace/tests/regression_test.rs b/crates/bevy_mikktspace/tests/regression_test.rs index 6ddee5e4183ec..a0632b76e29b5 100644 --- a/crates/bevy_mikktspace/tests/regression_test.rs +++ b/crates/bevy_mikktspace/tests/regression_test.rs @@ -1,12 +1,8 @@ -#![allow( +#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")] +#![expect( clippy::bool_assert_comparison, - clippy::explicit_iter_loop, - clippy::map_flatten, - clippy::match_same_arms, - clippy::redundant_else, clippy::semicolon_if_nothing_returned, - clippy::useless_conversion, - missing_docs + clippy::useless_conversion )] use bevy_mikktspace::{generate_tangents, Geometry}; diff --git a/crates/bevy_pbr/src/lib.rs b/crates/bevy_pbr/src/lib.rs index 0f68411eba48a..ea3eab5285c31 100644 --- a/crates/bevy_pbr/src/lib.rs +++ b/crates/bevy_pbr/src/lib.rs @@ -1,5 +1,4 @@ -// FIXME(15321): solve CI failures, then replace with `#![expect()]`. -#![allow(missing_docs, reason = "Not all docs are written yet, see #3492.")] +#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")] #![cfg_attr(docsrs, feature(doc_auto_cfg))] #![deny(unsafe_code)] #![doc( diff --git a/crates/bevy_picking/src/backend.rs b/crates/bevy_picking/src/backend.rs index ff7baa9ce9e5b..2e950fa804db8 100644 --- a/crates/bevy_picking/src/backend.rs +++ b/crates/bevy_picking/src/backend.rs @@ -84,8 +84,7 @@ pub struct PointerHits { } impl PointerHits { - // FIXME(15321): solve CI failures, then replace with `#[expect()]`. - #[allow(missing_docs, reason = "Not all docs are written yet (#3492).")] + #[expect(missing_docs, reason = "Not all docs are written yet, see #3492.")] pub fn new(pointer: prelude::PointerId, picks: Vec<(Entity, HitData)>, order: f32) -> Self { Self { pointer, @@ -113,8 +112,7 @@ pub struct HitData { } impl HitData { - // FIXME(15321): solve CI failures, then replace with `#[expect()]`. - #[allow(missing_docs, reason = "Not all docs are written yet (#3492).")] + #[expect(missing_docs, reason = "Not all docs are written yet, see #3492.")] pub fn new(camera: Entity, depth: f32, position: Option, normal: Option) -> Self { Self { camera, diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs index 46253e13d144e..c6e5ba0b4515d 100644 --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -1,7 +1,11 @@ -// FIXME(15321): solve CI failures, then replace with `#![expect()]`. -#![allow(missing_docs, reason = "Not all docs are written yet, see #3492.")] -// `rustdoc_internals` is needed for `#[doc(fake_variadics)]` -#![allow(internal_features)] +#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")] +#![cfg_attr( + any(docsrs, docsrs_dep), + expect( + internal_features, + reason = "rustdoc_internals is needed for fake_variadic" + ) +)] #![cfg_attr(any(docsrs, docsrs_dep), feature(doc_auto_cfg, rustdoc_internals))] #![doc( html_logo_url = "https://bevyengine.org/assets/icon.png", diff --git a/crates/bevy_render/macros/src/lib.rs b/crates/bevy_render/macros/src/lib.rs index 2d6d9a7864809..5f88f589ebca1 100644 --- a/crates/bevy_render/macros/src/lib.rs +++ b/crates/bevy_render/macros/src/lib.rs @@ -1,5 +1,4 @@ -// FIXME(15321): solve CI failures, then replace with `#![expect()]`. -#![allow(missing_docs, reason = "Not all docs are written yet, see #3492.")] +#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")] #![cfg_attr(docsrs, feature(doc_auto_cfg))] mod as_bind_group; diff --git a/crates/bevy_render/src/lib.rs b/crates/bevy_render/src/lib.rs index 2923afbad6048..0acdd5ad50748 100644 --- a/crates/bevy_render/src/lib.rs +++ b/crates/bevy_render/src/lib.rs @@ -1,8 +1,12 @@ -// FIXME(15321): solve CI failures, then replace with `#![expect()]`. -#![allow(missing_docs, reason = "Not all docs are written yet, see #3492.")] -#![allow(unsafe_code)] -// `rustdoc_internals` is needed for `#[doc(fake_variadics)]` -#![allow(internal_features)] +#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")] +#![expect(unsafe_code)] +#![cfg_attr( + any(docsrs, docsrs_dep), + expect( + internal_features, + reason = "rustdoc_internals is needed for fake_variadic" + ) +)] #![cfg_attr(any(docsrs, docsrs_dep), feature(doc_auto_cfg, rustdoc_internals))] #![doc( html_logo_url = "https://bevyengine.org/assets/icon.png", diff --git a/crates/bevy_sprite/src/lib.rs b/crates/bevy_sprite/src/lib.rs index 2d531e78590d3..40b987f2bf9fe 100644 --- a/crates/bevy_sprite/src/lib.rs +++ b/crates/bevy_sprite/src/lib.rs @@ -1,5 +1,4 @@ -// FIXME(15321): solve CI failures, then replace with `#![expect()]`. -#![allow(missing_docs, reason = "Not all docs are written yet, see #3492.")] +#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")] #![cfg_attr(docsrs, feature(doc_auto_cfg))] #![forbid(unsafe_code)] #![doc( diff --git a/crates/bevy_state/macros/src/lib.rs b/crates/bevy_state/macros/src/lib.rs index 873d358ef5e66..f461f0ead2ce7 100644 --- a/crates/bevy_state/macros/src/lib.rs +++ b/crates/bevy_state/macros/src/lib.rs @@ -1,5 +1,4 @@ -// FIXME(15321): solve CI failures, then replace with `#![expect()]`. -#![allow(missing_docs, reason = "Not all docs are written yet, see #3492.")] +#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")] #![cfg_attr(docsrs, feature(doc_auto_cfg))] extern crate proc_macro; diff --git a/crates/bevy_state/src/lib.rs b/crates/bevy_state/src/lib.rs index bf6a1aab93b7d..796516f5a6b9e 100644 --- a/crates/bevy_state/src/lib.rs +++ b/crates/bevy_state/src/lib.rs @@ -27,8 +27,13 @@ //! - The [`in_state`](crate::condition::in_state) and [`state_changed`](crate::condition::state_changed) run conditions - which are used //! to determine whether a system should run based on the current state. -// `rustdoc_internals` is needed for `#[doc(fake_variadics)]` -#![allow(internal_features)] +#![cfg_attr( + any(docsrs, docsrs_dep), + expect( + internal_features, + reason = "rustdoc_internals is needed for fake_variadic" + ) +)] #![cfg_attr(any(docsrs, docsrs_dep), feature(rustdoc_internals))] #[cfg(feature = "bevy_app")] diff --git a/crates/bevy_ui/src/lib.rs b/crates/bevy_ui/src/lib.rs index 3adb83fc37891..842306fdf56b3 100644 --- a/crates/bevy_ui/src/lib.rs +++ b/crates/bevy_ui/src/lib.rs @@ -1,5 +1,4 @@ -// FIXME(15321): solve CI failures, then replace with `#![expect()]`. -#![allow(missing_docs, reason = "Not all docs are written yet, see #3492.")] +#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")] #![cfg_attr(docsrs, feature(doc_auto_cfg))] #![doc( html_logo_url = "https://bevyengine.org/assets/icon.png", diff --git a/crates/bevy_window/src/event.rs b/crates/bevy_window/src/event.rs index e202b5fab5ca7..4520a651ceef1 100644 --- a/crates/bevy_window/src/event.rs +++ b/crates/bevy_window/src/event.rs @@ -412,8 +412,7 @@ impl AppLifecycle { derive(serde::Serialize, serde::Deserialize), reflect(Serialize, Deserialize) )] -// FIXME(15321): solve CI failures, then replace with `#[expect()]`. -#[allow(missing_docs, reason = "Not all docs are written yet (#3492).")] +#[expect(missing_docs, reason = "Not all docs are written yet, see #3492.")] pub enum WindowEvent { AppLifecycle(AppLifecycle), CursorEntered(CursorEntered), diff --git a/tests/how_to_test_systems.rs b/tests/how_to_test_systems.rs index ac4fc2f732336..a2cb86a680dfe 100644 --- a/tests/how_to_test_systems.rs +++ b/tests/how_to_test_systems.rs @@ -1,4 +1,4 @@ -#![allow(missing_docs)] +#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")] use bevy::prelude::*; #[derive(Component, Default)]