Skip to content

Rust 1.83, allow -> expect (missing_docs) #16561

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
9 changes: 7 additions & 2 deletions crates/bevy_app/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
3 changes: 1 addition & 2 deletions crates/bevy_asset/macros/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 1 addition & 3 deletions crates/bevy_asset/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions crates/bevy_core_pipeline/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
3 changes: 1 addition & 2 deletions crates/bevy_derive/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
3 changes: 1 addition & 2 deletions crates/bevy_diagnostic/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
3 changes: 1 addition & 2 deletions crates/bevy_ecs/macros/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
9 changes: 7 additions & 2 deletions crates/bevy_ecs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
3 changes: 1 addition & 2 deletions crates/bevy_encase_derive/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
3 changes: 1 addition & 2 deletions crates/bevy_image/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
8 changes: 7 additions & 1 deletion crates/bevy_math/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
4 changes: 1 addition & 3 deletions crates/bevy_mesh/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
10 changes: 3 additions & 7 deletions crates/bevy_mikktspace/tests/regression_test.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
3 changes: 1 addition & 2 deletions crates/bevy_pbr/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
6 changes: 2 additions & 4 deletions crates/bevy_picking/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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<Vec3>, normal: Option<Vec3>) -> Self {
Self {
camera,
Expand Down
12 changes: 8 additions & 4 deletions crates/bevy_reflect/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
3 changes: 1 addition & 2 deletions crates/bevy_render/macros/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
14 changes: 9 additions & 5 deletions crates/bevy_render/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
3 changes: 1 addition & 2 deletions crates/bevy_sprite/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
3 changes: 1 addition & 2 deletions crates/bevy_state/macros/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
9 changes: 7 additions & 2 deletions crates/bevy_state/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,13 @@
//! - The [`in_state<S>`](crate::condition::in_state) and [`state_changed<S>`](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")]
Expand Down
3 changes: 1 addition & 2 deletions crates/bevy_ui/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
3 changes: 1 addition & 2 deletions crates/bevy_window/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion tests/how_to_test_systems.rs
Original file line number Diff line number Diff line change
@@ -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)]
Expand Down
Loading