Skip to content
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

Move all crate attributes after the docs #9560

Closed
Closed
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
3 changes: 2 additions & 1 deletion crates/bevy_core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! This crate provides core functionality for Bevy Engine.

#![warn(missing_docs)]
#![allow(clippy::type_complexity)]
//! This crate provides core functionality for Bevy Engine.

mod name;
#[cfg(feature = "serialize")]
Expand Down
8 changes: 4 additions & 4 deletions crates/bevy_dylib/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
#![warn(missing_docs)]
#![allow(clippy::type_complexity)]
#![allow(clippy::single_component_path_imports)]

//! Forces dynamic linking of Bevy.
//!
//! Dynamic linking causes Bevy to be built and linked as a dynamic library. This will make
Expand Down Expand Up @@ -51,6 +47,10 @@
//! use bevy_dylib;
//! ```

#![warn(missing_docs)]
#![allow(clippy::type_complexity)]
#![allow(clippy::single_component_path_imports)]

// Force linking of the main bevy crate
#[allow(unused_imports)]
use bevy_internal;
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![doc = include_str!("../README.md")]
#![warn(clippy::undocumented_unsafe_blocks)]
#![warn(missing_docs)]
#![allow(clippy::type_complexity)]
#![doc = include_str!("../README.md")]

#[cfg(target_pointer_width = "16")]
compile_error!("bevy_ecs cannot safely compile for a 16-bit platform.");
Expand Down
6 changes: 3 additions & 3 deletions crates/bevy_gizmos/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#![allow(clippy::type_complexity)]
#![warn(missing_docs)]

//! This crate adds an immediate mode drawing api to Bevy for visual debugging.
//!
//! # Example
Expand All @@ -16,6 +13,9 @@
//!
//! See the documentation on [`Gizmos`](crate::gizmos::Gizmos) for more examples.

#![allow(clippy::type_complexity)]
#![warn(missing_docs)]

use std::mem;

use bevy_app::{Last, Plugin, PostUpdate};
Expand Down
5 changes: 3 additions & 2 deletions crates/bevy_hierarchy/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#![allow(clippy::type_complexity)]
#![warn(missing_docs)]
//! `bevy_hierarchy` can be used to define hierarchies of entities.
//!
//! Most commonly, these hierarchies are used for inheriting `Transform` values
//! from the [`Parent`] to its [`Children`].

#![allow(clippy::type_complexity)]
#![warn(missing_docs)]

mod components;
pub use components::*;

Expand Down
6 changes: 3 additions & 3 deletions crates/bevy_input/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#![allow(clippy::type_complexity)]
#![warn(missing_docs)]

//! Input functionality for the [Bevy game engine](https://bevyengine.org/).
//!
//! # Supported input devices
//!
//! `bevy` currently supports keyboard, mouse, gamepad, and touch inputs.

#![allow(clippy::type_complexity)]
#![warn(missing_docs)]

mod axis;
/// Common run conditions
pub mod common_conditions;
Expand Down
3 changes: 2 additions & 1 deletion crates/bevy_internal/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! This module is separated into its own crate to enable simple dynamic linking for Bevy, and should not be used directly

#![allow(clippy::type_complexity)]
#![warn(missing_docs)]
//! This module is separated into its own crate to enable simple dynamic linking for Bevy, and should not be used directly

/// `use bevy::prelude::*;` to import common components, bundles, and plugins.
pub mod prelude;
Expand Down
5 changes: 3 additions & 2 deletions crates/bevy_log/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(clippy::type_complexity)]
#![warn(missing_docs)]
//! This crate provides logging functions and configuration for [Bevy](https://bevyengine.org)
//! apps, and automatically configures platform specific log handlers (i.e. WASM or Android).
//!
Expand All @@ -12,6 +10,9 @@
//! For more fine-tuned control over logging behavior, set up the [`LogPlugin`] or
//! `DefaultPlugins` during app initialization.

#![allow(clippy::type_complexity)]
#![warn(missing_docs)]

#[cfg(feature = "trace")]
use std::panic;

Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_tasks/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![doc = include_str!("../README.md")]
#![warn(missing_docs)]
#![allow(clippy::type_complexity)]
#![doc = include_str!("../README.md")]

mod slice;
pub use slice::{ParallelSlice, ParallelSliceMut};
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_time/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![doc = include_str!("../README.md")]
#![allow(clippy::type_complexity)]
#![warn(missing_docs)]
#![doc = include_str!("../README.md")]

/// Common run conditions
pub mod common_conditions;
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_transform/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![doc = include_str!("../README.md")]
#![allow(clippy::type_complexity)]
#![warn(missing_docs)]
#![warn(clippy::undocumented_unsafe_blocks)]
#![doc = include_str!("../README.md")]

pub mod commands;
/// The basic components of the transform crate
Expand Down
5 changes: 3 additions & 2 deletions crates/bevy_ui/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#![allow(clippy::type_complexity)]

//! This crate contains Bevy's UI system, which can be used to create UI for both 2D and 3D games
//! # Basic usage
//! Spawn UI elements with [`node_bundles::ButtonBundle`], [`node_bundles::ImageBundle`], [`node_bundles::TextBundle`] and [`node_bundles::NodeBundle`]
//! This UI is laid out with the Flexbox and CSS Grid layout models (see <https://cssreference.io/flexbox/>)

#![allow(clippy::type_complexity)]

mod focus;
mod geometry;
mod layout;
Expand Down
1 change: 1 addition & 0 deletions crates/bevy_utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
//!
//! [Bevy]: https://bevyengine.org/
//!

#![allow(clippy::type_complexity)]
#![warn(missing_docs)]
#![warn(clippy::undocumented_unsafe_blocks)]
Expand Down
5 changes: 3 additions & 2 deletions crates/bevy_winit/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#![allow(clippy::type_complexity)]
#![warn(missing_docs)]
//! `bevy_winit` provides utilities to handle window creation and the eventloop through [`winit`]
//!
//! Most commonly, the [`WinitPlugin`] is used as part of
//! [`DefaultPlugins`](https://docs.rs/bevy/latest/bevy/struct.DefaultPlugins.html).
//! The app's [runner](bevy_app::App::runner) is set by `WinitPlugin` and handles the `winit` [`EventLoop`](winit::event_loop::EventLoop).
//! See `winit_runner` for details.

#![allow(clippy::type_complexity)]
#![warn(missing_docs)]

pub mod accessibility;
mod converters;
mod system;
Expand Down