Skip to content

Commit

Permalink
Lint: Downgrade expect(clippy::module_name_repetitions) to allow.
Browse files Browse the repository at this point in the history
Rust 1.84 (estimated) and nightly today will remove these false
positives, so we don’t want to `expect` them and make lint on nightly
fail.
  • Loading branch information
kpreid committed Nov 1, 2024
1 parent fb190ff commit a4eb798
Show file tree
Hide file tree
Showing 49 changed files with 99 additions and 96 deletions.
4 changes: 2 additions & 2 deletions all-is-cubes-base/src/math/coord.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! Numeric types used for coordinates and related quantities.
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use euclid::{Box3D, Point3D, Size2D, Size3D, Vector3D};
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-base/src/math/face.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//! Axis-aligned unit vectors: the [`Face6`] and [`Face7`] types.
//! This module is private but reexported by its parent.
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use core::fmt;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-base/src/math/matrix.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//! Integer-coordinate matrices.
//! This module is private but reexported by its parent.
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use core::cmp::Ordering;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-base/src/math/octant.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use core::{fmt, ops};
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-base/src/math/rotation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
clippy::large_stack_arrays,
reason = "effectively-false positive on Arbitrary derive"
)]
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use core::marker::PhantomData;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-base/src/math/vol.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use alloc::boxed::Box;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-base/src/raycast/axis_aligned.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use crate::math::{self, Cube, Face7, FreeCoordinate, GridAab};
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-content/src/blocks.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//! Block definitions that are specific to the demo/initial content and not fundamental
//! or UI.
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use alloc::sync::Arc;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-content/src/dungeon/maze.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use alloc::boxed::Box;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-content/src/landscape.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use alloc::boxed::Box;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-content/src/template.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! First-run game content.
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use alloc::boxed::Box;
Expand Down
2 changes: 1 addition & 1 deletion all-is-cubes-content/src/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use crate::LandscapeBlocks::{self, Leaves, Log};
unnameable_types,
reason = "TODO: this should be public with an opaque struct wrapper"
)]
#[expect(clippy::module_name_repetitions)] // TODO: rename to Growth?
#[allow(clippy::module_name_repetitions)] // TODO: rename to Growth?
pub enum TreeGrowth {
Sapling = 1, // radius = 1
G2, // radius = 2
Expand Down
5 changes: 4 additions & 1 deletion all-is-cubes-desktop/src/glue/winit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ pub fn map_key(key: winit::keyboard::PhysicalKey) -> Option<all_is_cubes_ui::app
})
}

#[expect(clippy::module_name_repetitions)]
#[allow(
clippy::module_name_repetitions,
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]
pub fn cursor_icon_to_winit(icon: &all_is_cubes_ui::apps::CursorIcon) -> winit::window::CursorIcon {
use all_is_cubes_ui::apps::CursorIcon as A;
use winit::window::CursorIcon as W;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-desktop/src/record/options.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! Options controlling recording.
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use std::ops::RangeInclusive;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-desktop/src/session.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use std::path::PathBuf;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-desktop/src/terminal/options.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use std::ops;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-gpu/src/common/info.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use std::time::Duration;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-mesh/src/dynamic/chunk.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use all_is_cubes::euclid::Translation3D;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-mesh/src/dynamic/instance.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use alloc::vec::Vec;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-mesh/src/dynamic/render_data.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use core::fmt;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-port/src/export.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

#[allow(unused_imports)]
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-port/src/import.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use std::io;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-render/src/headless.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use alloc::vec::Vec;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-render/src/raytracer/renderer.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use alloc::boxed::Box;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-ui/src/apps/input.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use alloc::vec::Vec;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-ui/src/apps/session.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use alloc::boxed::Box;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-ui/src/vui/layout.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use alloc::boxed::Box;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-ui/src/vui/widgets/button.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use alloc::borrow::ToOwned as _;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-ui/src/vui/widgets/progress_bar.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use alloc::boxed::Box;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-ui/src/vui/widgets/text.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use alloc::boxed::Box;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-ui/src/vui/widgets/theme.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use alloc::format;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes/src/block/attributes.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! [`BlockAttributes`] and closely related types.
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use core::{fmt, ops};
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes/src/block/block_def.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use alloc::sync::Arc;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes/src/block/eval/evaluated.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! [`EvaluatedBlock`] and [`Evoxel`].
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use alloc::boxed::Box;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes/src/block/eval/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
//! it does not contain the elements that are evaluated
//! ([`crate::block::Primitive`] and [`crate::block::Modifier`])
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

mod control;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes/src/block/modifier/composite.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use alloc::vec;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes/src/character/cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
//!
//! TODO: It's unclear what the scope of this module should be.
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use core::fmt;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes/src/inv/inventory.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! [`Inventory`] for storing items.
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use alloc::borrow::Cow;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes/src/inv/tool.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! [`Tool`] and related.
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use alloc::borrow::Cow;
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes/src/listen/cell.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![expect(
#![allow(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "false positive; TODO: remove after Rust 1.84 is released"
)]

use core::fmt;
Expand Down
Loading

0 comments on commit a4eb798

Please sign in to comment.