Rust 1.83, allow -> expect (missing_docs) (#16561)
# Objective We were waiting for 1.83 to address most of these, due to a bug with `missing_docs` and `expect`. Relates to, but does not entirely complete, #15059. ## Solution - Upgrade to 1.83 - Switch `allow(missing_docs)` to `expect(missing_docs)` - Remove a few now-unused `allow`s along the way, or convert to `expect`
This commit is contained in:
parent
5a94beb239
commit
f2719f5470
@ -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 = [
|
||||
|
@ -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(
|
||||
|
@ -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;
|
||||
|
@ -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",
|
||||
|
@ -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(
|
||||
|
@ -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(
|
||||
|
@ -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(
|
||||
|
@ -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;
|
||||
|
@ -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(
|
||||
|
@ -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(
|
||||
|
@ -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 {
|
||||
|
@ -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(
|
||||
|
@ -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;
|
||||
|
@ -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};
|
||||
|
@ -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(
|
||||
|
@ -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<Vec3>, normal: Option<Vec3>) -> Self {
|
||||
Self {
|
||||
camera,
|
||||
|
@ -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",
|
||||
|
@ -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;
|
||||
|
@ -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",
|
||||
|
@ -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(
|
||||
|
@ -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;
|
||||
|
@ -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")]
|
||||
|
@ -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",
|
||||
|
@ -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),
|
||||
|
@ -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)]
|
||||
|
Loading…
Reference in New Issue
Block a user