Skip to content

Commit ee6dfd3

Browse files
alice-i-cecileAlice Cecile
and
Alice Cecile
authored
Revert "Add on_unimplemented Diagnostics to Most Public Traits" (#13413)
# Objective - Rust 1.78 breaks all Android support, see #13331 - We should not bump the MSRV to 1.78 until that's resolved in #13366. ## Solution - Temporarily revert #13347 Co-authored-by: Alice Cecile <[email protected]>
1 parent 1fcf6a4 commit ee6dfd3

30 files changed

+12
-129
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ keywords = ["game", "engine", "gamedev", "graphics", "bevy"]
1010
license = "MIT OR Apache-2.0"
1111
repository = "https://github.com/bevyengine/bevy"
1212
documentation = "https://docs.rs/bevy"
13-
rust-version = "1.78.0"
13+
rust-version = "1.77.0"
1414

1515
[workspace]
1616
exclude = [

crates/bevy_app/src/plugin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ use std::any::Any;
5454
/// }
5555
/// }
5656
/// # fn damp_flickering() {}
57-
/// ```
57+
/// ````
5858
pub trait Plugin: Downcast + Any + Send + Sync {
5959
/// Configures the [`App`] to which this plugin is added.
6060
fn build(&self, app: &mut App);

crates/bevy_asset/src/lib.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -223,11 +223,6 @@ impl Plugin for AssetPlugin {
223223
}
224224
}
225225

226-
#[diagnostic::on_unimplemented(
227-
message = "`{Self}` is not an `Asset`",
228-
label = "invalid `Asset`",
229-
note = "consider annotating `{Self}` with `#[derive(Asset)]`"
230-
)]
231226
pub trait Asset: VisitAssetDependencies + TypePath + Send + Sync + 'static {}
232227

233228
pub trait VisitAssetDependencies {

crates/bevy_ecs/src/bundle.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,6 @@ use std::ptr::NonNull;
141141
// bundle, in the _exact_ order that [`DynamicBundle::get_components`] is called.
142142
// - [`Bundle::from_components`] must call `func` exactly once for each [`ComponentId`] returned by
143143
// [`Bundle::component_ids`].
144-
#[diagnostic::on_unimplemented(
145-
message = "`{Self}` is not a `Bundle`",
146-
label = "invalid `Bundle`",
147-
note = "consider annotating `{Self}` with `#[derive(Component)]` or `#[derive(Bundle)]`"
148-
)]
149144
pub unsafe trait Bundle: DynamicBundle + Send + Sync + 'static {
150145
/// Gets this [`Bundle`]'s component ids, in the order of this bundle's [`Component`]s
151146
#[doc(hidden)]

crates/bevy_ecs/src/component.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,6 @@ use std::{
150150
///
151151
/// [`SyncCell`]: bevy_utils::synccell::SyncCell
152152
/// [`Exclusive`]: https://doc.rust-lang.org/nightly/std/sync/struct.Exclusive.html
153-
#[diagnostic::on_unimplemented(
154-
message = "`{Self}` is not a `Component`",
155-
label = "invalid `Component`",
156-
note = "consider annotating `{Self}` with `#[derive(Component)]`"
157-
)]
158153
pub trait Component: Send + Sync + 'static {
159154
/// A constant indicating the storage type used for this component.
160155
const STORAGE_TYPE: StorageType;

crates/bevy_ecs/src/entity/map_entities.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ use super::EntityHashMap;
3737
/// }
3838
/// }
3939
/// ```
40+
///
4041
pub trait MapEntities {
4142
/// Updates all [`Entity`] references stored inside using `entity_mapper`.
4243
///

crates/bevy_ecs/src/event.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@ use std::{
2828
/// You can conveniently access events using the [`EventReader`] and [`EventWriter`] system parameter.
2929
///
3030
/// Events must be thread-safe.
31-
#[diagnostic::on_unimplemented(
32-
message = "`{Self}` is not an `Event`",
33-
label = "invalid `Event`",
34-
note = "consider annotating `{Self}` with `#[derive(Event]`"
35-
)]
3631
pub trait Event: Send + Sync + 'static {}
3732

3833
/// An `EventId` uniquely identifies an event stored in a specific [`World`].

crates/bevy_ecs/src/query/fetch.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,10 +268,6 @@ use std::{cell::UnsafeCell, marker::PhantomData};
268268
///
269269
/// [`Query`]: crate::system::Query
270270
/// [`ReadOnly`]: Self::ReadOnly
271-
#[diagnostic::on_unimplemented(
272-
message = "`{Self}` is not valid to request as data in a `Query`",
273-
label = "invalid `Query` data"
274-
)]
275271
pub unsafe trait QueryData: WorldQuery {
276272
/// The read-only variant of this [`QueryData`], which satisfies the [`ReadOnlyQueryData`] trait.
277273
type ReadOnly: ReadOnlyQueryData<State = <Self as WorldQuery>::State>;

crates/bevy_ecs/src/query/filter.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,7 @@ use std::{cell::UnsafeCell, marker::PhantomData};
7070
/// [`matches_component_set`]: Self::matches_component_set
7171
/// [`Query`]: crate::system::Query
7272
/// [`State`]: Self::State
73-
#[diagnostic::on_unimplemented(
74-
message = "`{Self}` is not a valid `Query` filter",
75-
label = "invalid `Query` filter",
76-
note = "a `QueryFilter` typically uses a combination of `With<T>` and `Without<T>` statements"
77-
)]
73+
7874
pub trait QueryFilter: WorldQuery {
7975
/// Returns true if (and only if) this Filter relies strictly on archetypes to limit which
8076
/// components are accessed by the Query.
@@ -942,11 +938,6 @@ impl<T: Component> QueryFilter for Changed<T> {
942938
///
943939
/// [`Added`] and [`Changed`] works with entities, and therefore are not archetypal. As such
944940
/// they do not implement [`ArchetypeFilter`].
945-
#[diagnostic::on_unimplemented(
946-
message = "`{Self}` is not a valid `Query` filter based on archetype information",
947-
label = "invalid `Query` filter",
948-
note = "an `ArchetypeFilter` typically uses a combination of `With<T>` and `Without<T>` statements"
949-
)]
950941
pub trait ArchetypeFilter: QueryFilter {}
951942

952943
impl<T: Component> ArchetypeFilter for With<T> {}

crates/bevy_ecs/src/schedule/config.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,6 @@ impl<T> NodeConfigs<T> {
288288
/// )
289289
/// );
290290
/// ```
291-
#[diagnostic::on_unimplemented(
292-
message = "`{Self}` does not describe a valid system configuration",
293-
label = "invalid system configuration"
294-
)]
295291
pub trait IntoSystemConfigs<Marker>
296292
where
297293
Self: Sized,
@@ -566,10 +562,6 @@ impl SystemSetConfig {
566562
pub type SystemSetConfigs = NodeConfigs<InternedSystemSet>;
567563

568564
/// Types that can convert into a [`SystemSetConfigs`].
569-
#[diagnostic::on_unimplemented(
570-
message = "`{Self}` does not describe a valid system set configuration",
571-
label = "invalid system set configuration"
572-
)]
573565
pub trait IntoSystemSetConfigs
574566
where
575567
Self: Sized,

crates/bevy_ecs/src/schedule/set.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,6 @@ impl SystemSet for AnonymousSet {
149149
}
150150

151151
/// Types that can be converted into a [`SystemSet`].
152-
#[diagnostic::on_unimplemented(
153-
message = "`{Self}` is not a system set",
154-
label = "invalid system set"
155-
)]
156152
pub trait IntoSystemSet<Marker>: Sized {
157153
/// The type of [`SystemSet`] this instance converts into.
158154
type Set: SystemSet;

crates/bevy_ecs/src/system/adapter_system.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ use crate::{schedule::InternedSystemSet, world::unsafe_world_cell::UnsafeWorldCe
3939
/// # system.initialize(&mut world);
4040
/// # assert!(system.run((), &mut world));
4141
/// ```
42-
#[diagnostic::on_unimplemented(
43-
message = "`{Self}` can not adapt a system of type `{S}`",
44-
label = "invalid system adapter"
45-
)]
4642
pub trait Adapt<S: System>: Send + Sync + 'static {
4743
/// The [input](System::In) type for an [`AdapterSystem`].
4844
type In;

crates/bevy_ecs/src/system/combinator.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,6 @@ use super::{ReadOnlySystem, System};
8383
/// # assert!(world.resource::<RanFlag>().0);
8484
/// # world.resource_mut::<RanFlag>().0 = false;
8585
/// ```
86-
#[diagnostic::on_unimplemented(
87-
message = "`{Self}` can not combine systems `{A}` and `{B}`",
88-
label = "invalid system combination",
89-
note = "the inputs and outputs of `{A}` and `{B}` are not compatible with this combiner"
90-
)]
9186
pub trait Combine<A: System, B: System> {
9287
/// The [input](System::In) type for a [`CombinatorSystem`].
9388
type In;

crates/bevy_ecs/src/system/exclusive_function_system.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,18 +161,14 @@ where
161161
///
162162
/// This trait can be useful for making your own systems which accept other systems,
163163
/// sometimes called higher order systems.
164-
#[diagnostic::on_unimplemented(
165-
message = "`{Self}` is not an exclusive system",
166-
label = "invalid system"
167-
)]
168164
pub trait ExclusiveSystemParamFunction<Marker>: Send + Sync + 'static {
169165
/// The input type to this system. See [`System::In`].
170166
type In;
171167

172168
/// The return type of this system. See [`System::Out`].
173169
type Out;
174170

175-
/// The [`ExclusiveSystemParam`]'s defined by this system's `fn` parameters.
171+
/// The [`ExclusiveSystemParam`]/s defined by this system's `fn` parameters.
176172
type Param: ExclusiveSystemParam;
177173

178174
/// Executes this system once. See [`System::run`].

crates/bevy_ecs/src/system/exclusive_system_param.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ use std::marker::PhantomData;
1010

1111
/// A parameter that can be used in an exclusive system (a system with an `&mut World` parameter).
1212
/// Any parameters implementing this trait must come after the `&mut World` parameter.
13-
#[diagnostic::on_unimplemented(
14-
message = "`{Self}` can not be used as a parameter for an exclusive system",
15-
label = "invalid system parameter"
16-
)]
1713
pub trait ExclusiveSystemParam: Sized {
1814
/// Used to store data which persists across invocations of a system.
1915
type State: Send + Sync + 'static;

crates/bevy_ecs/src/system/function_system.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -626,10 +626,6 @@ where
626626
/// ```
627627
/// [`PipeSystem`]: crate::system::PipeSystem
628628
/// [`ParamSet`]: crate::system::ParamSet
629-
#[diagnostic::on_unimplemented(
630-
message = "`{Self}` is not a valid system",
631-
label = "invalid system"
632-
)]
633629
pub trait SystemParamFunction<Marker>: Send + Sync + 'static {
634630
/// The input type to this system. See [`System::In`].
635631
type In;

crates/bevy_ecs/src/system/mod.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,6 @@ use crate::world::World;
147147
// This trait has to be generic because we have potentially overlapping impls, in particular
148148
// because Rust thinks a type could impl multiple different `FnMut` combinations
149149
// even though none can currently
150-
#[diagnostic::on_unimplemented(
151-
message = "`{Self}` is not a valid system with input `{In}` and output `{Out}`",
152-
label = "invalid system"
153-
)]
154150
pub trait IntoSystem<In, Out, Marker>: Sized {
155151
/// The type of [`System`] that this instance converts into.
156152
type System: System<In = In, Out = Out>;

crates/bevy_ecs/src/system/system.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ use super::IntoSystem;
2222
/// Systems are executed in parallel, in opportunistic order; data access is managed automatically.
2323
/// It's possible to specify explicit execution order between specific systems,
2424
/// see [`IntoSystemConfigs`](crate::schedule::IntoSystemConfigs).
25-
#[diagnostic::on_unimplemented(message = "`{Self}` is not a system", label = "invalid system")]
2625
pub trait System: Send + Sync + 'static {
2726
/// The system's input. See [`In`](crate::system::In) for
2827
/// [`FunctionSystem`](crate::system::FunctionSystem)s.

crates/bevy_ecs/src/system/system_param.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -432,11 +432,6 @@ impl_param_set!();
432432
/// ```
433433
///
434434
/// [`Exclusive`]: https://doc.rust-lang.org/nightly/std/sync/struct.Exclusive.html
435-
#[diagnostic::on_unimplemented(
436-
message = "`{Self}` is not a `Resource`",
437-
label = "invalid `Resource`",
438-
note = "consider annotating `{Self}` with `#[derive(Resource)]`"
439-
)]
440435
pub trait Resource: Send + Sync + 'static {}
441436

442437
// SAFETY: Res only reads a single World resource

crates/bevy_reflect/compile_fail/tests/reflect_derive/generics_fail.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ struct NoReflect(f32);
1212

1313
fn main() {
1414
let mut foo: Box<dyn Struct> = Box::new(Foo::<NoReflect> { a: NoReflect(42.0) });
15-
//~^ ERROR: `NoReflect` does not provide type registration information
15+
//~^ ERROR: not satisfied
1616

1717
// foo doesn't implement Reflect because NoReflect doesn't implement Reflect
1818
foo.get_field::<NoReflect>("a").unwrap();
19-
//~^ ERROR: `NoReflect` can not be reflected
19+
//~^ ERROR: not satisfied
2020
}

crates/bevy_reflect/compile_fail/tests/reflect_derive/generics_fail.stderr

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
error[E0277]: `NoReflect` can not be reflected
1+
error[E0277]: the trait bound `NoReflect: Reflect` is not satisfied
22
--> tests/reflect_derive/generics_fail.rs:18:21
33
|
44
18 | foo.get_field::<NoReflect>("a").unwrap();
55
| --------- ^^^^^^^^^ the trait `Reflect` is not implemented for `NoReflect`
66
| |
77
| required by a bound introduced by this call
88
|
9-
= note: Try using `#[derive(Reflect)]`
109
= help: the following other types implement trait `Reflect`:
1110
bool
1211
char
@@ -18,19 +17,17 @@ error[E0277]: `NoReflect` can not be reflected
1817
i128
1918
and 74 others
2019
note: required by a bound in `bevy_reflect::GetField::get_field`
21-
--> $BEVY_ROOT/crates/bevy_reflect/src/struct_trait.rs:244:21
20+
--> $BEVY_ROOT/crates/bevy_reflect/src/struct_trait.rs:242:21
2221
|
23-
244 | fn get_field<T: Reflect>(&self, name: &str) -> Option<&T>;
22+
242 | fn get_field<T: Reflect>(&self, name: &str) -> Option<&T>;
2423
| ^^^^^^^ required by this bound in `GetField::get_field`
2524

26-
error[E0277]: `NoReflect` does not provide type registration information
25+
error[E0277]: the trait bound `NoReflect: GetTypeRegistration` is not satisfied
2726
--> tests/reflect_derive/generics_fail.rs:14:36
2827
|
2928
14 | let mut foo: Box<dyn Struct> = Box::new(Foo::<NoReflect> { a: NoReflect(42.0) });
30-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Invalid Type
29+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `GetTypeRegistration` is not implemented for `NoReflect`, which is required by `Foo<NoReflect>: bevy_reflect::Struct`
3130
|
32-
= help: the trait `GetTypeRegistration` is not implemented for `NoReflect`, which is required by `Foo<NoReflect>: bevy_reflect::Struct`
33-
= note: Try using `#[derive(Reflect)]`
3431
= help: the following other types implement trait `GetTypeRegistration`:
3532
bool
3633
char

crates/bevy_reflect/src/from_reflect.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ use crate::{FromType, Reflect};
2121
/// [derive macro]: bevy_reflect_derive::FromReflect
2222
/// [`DynamicStruct`]: crate::DynamicStruct
2323
/// [crate-level documentation]: crate
24-
#[diagnostic::on_unimplemented(
25-
message = "`{Self}` can not be created through reflection",
26-
note = "consider annotating `{Self}` with `#[derive(FromReflect)]`"
27-
)]
2824
pub trait FromReflect: Reflect + Sized {
2925
/// Constructs a concrete instance of `Self` from a reflected value.
3026
fn from_reflect(reflect: &dyn Reflect) -> Option<Self>;

crates/bevy_reflect/src/path/mod.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,6 @@ impl<'a> ReflectPath<'a> for &'a str {
230230
/// [`List`]: crate::List
231231
/// [`Array`]: crate::Array
232232
/// [`Enum`]: crate::Enum
233-
#[diagnostic::on_unimplemented(
234-
message = "`{Self}` does not provide a reflection path",
235-
note = "consider annotating `{Self}` with `#[derive(Reflect)]`"
236-
)]
237233
pub trait GetPath: Reflect {
238234
/// Returns a reference to the value specified by `path`.
239235
///

crates/bevy_reflect/src/reflect.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,6 @@ impl std::fmt::Display for ReflectKind {
179179
/// [`bevy_reflect`]: crate
180180
/// [derive macro]: bevy_reflect_derive::Reflect
181181
/// [crate-level documentation]: crate
182-
#[diagnostic::on_unimplemented(
183-
message = "`{Self}` can not be reflected",
184-
note = "consider annotating `{Self}` with `#[derive(Reflect)]`"
185-
)]
186182
pub trait Reflect: DynamicTypePath + Any + Send + Sync {
187183
/// Returns the [`TypeInfo`] of the type _represented_ by this value.
188184
///

crates/bevy_reflect/src/type_info.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,6 @@ use std::fmt::Debug;
7070
/// ```
7171
///
7272
/// [utility]: crate::utility
73-
#[diagnostic::on_unimplemented(
74-
message = "`{Self}` can not provide type information through reflection",
75-
note = "consider annotating `{Self}` with `#[derive(Reflect)]`"
76-
)]
7773
pub trait Typed: Reflect + TypePath {
7874
/// Returns the compile-time [info] for the underlying type.
7975
///

crates/bevy_reflect/src/type_path.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,6 @@ use std::fmt;
7979
/// [`crate_name`]: TypePath::crate_name
8080
/// [`module_path`]: TypePath::module_path
8181
/// [`type_ident`]: TypePath::type_ident
82-
#[diagnostic::on_unimplemented(
83-
message = "`{Self}` does not have a type path",
84-
note = "consider annotating `{Self}` with `#[derive(Reflect)]` or `#[derive(TypePath)]`"
85-
)]
8682
pub trait TypePath: 'static {
8783
/// Returns the fully qualified path of the underlying type.
8884
///
@@ -133,10 +129,6 @@ pub trait TypePath: 'static {
133129
/// Since this is a supertrait of [`Reflect`] its methods can be called on a `dyn Reflect`.
134130
///
135131
/// [`Reflect`]: crate::Reflect
136-
#[diagnostic::on_unimplemented(
137-
message = "`{Self}` can not be used as a dynamic type path",
138-
note = "consider annotating `{Self}` with `#[derive(Reflect)]` or `#[derive(TypePath)]`"
139-
)]
140132
pub trait DynamicTypePath {
141133
/// See [`TypePath::type_path`].
142134
fn reflect_type_path(&self) -> &str;

crates/bevy_reflect/src/type_registry.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ impl Debug for TypeRegistryArc {
5656
/// See the [crate-level documentation] for more information on type registration.
5757
///
5858
/// [crate-level documentation]: crate
59-
#[diagnostic::on_unimplemented(
60-
message = "`{Self}` does not provide type registration information",
61-
note = "consider annotating `{Self}` with `#[derive(Reflect)]`"
62-
)]
6359
pub trait GetTypeRegistration: 'static {
6460
/// Returns the default [`TypeRegistration`] for this type.
6561
fn get_type_registration() -> TypeRegistration;

crates/bevy_state/src/state/freely_mutable_state.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ use super::transitions::*;
99
///
1010
/// While ordinary states are freely mutable (and implement this trait as part of their derive macro),
1111
/// computed states are not: instead, they can *only* change when the states that drive them do.
12-
#[diagnostic::on_unimplemented(note = "consider annotating `{Self}` with `#[derive(States)]`")]
1312
pub trait FreelyMutableState: States {
1413
/// This function registers all the necessary systems to apply state changes and run transition schedules
1514
fn register_state(schedule: &mut Schedule) {

crates/bevy_state/src/state/states.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ use std::hash::Hash;
5454
/// app.add_systems(Update, handle_escape_pressed.run_if(in_state(GameState::MainMenu)));
5555
/// app.add_systems(OnEnter(GameState::SettingsMenu), open_settings_menu);
5656
/// ```
57-
#[diagnostic::on_unimplemented(
58-
message = "`{Self}` can not be used as a state",
59-
label = "invalid state",
60-
note = "consider annotating `{Self}` with `#[derive(States)]`"
61-
)]
6257
pub trait States: 'static + Send + Sync + Clone + PartialEq + Eq + Hash + Debug {
6358
/// How many other states this state depends on.
6459
/// Used to help order transitions and de-duplicate [`ComputedStates`](crate::state::ComputedStates), as well as prevent cyclical

crates/bevy_state/src/state/sub_states.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,6 @@ pub use bevy_state_macros::SubStates;
143143
///
144144
/// impl FreelyMutableState for GamePhase {}
145145
/// ```
146-
#[diagnostic::on_unimplemented(
147-
message = "`{Self}` can not be used as a sub-state",
148-
label = "invalid sub-state",
149-
note = "consider annotating `{Self}` with `#[derive(SubStates)]`"
150-
)]
151146
pub trait SubStates: States + FreelyMutableState {
152147
/// The set of states from which the [`Self`] is derived.
153148
///

0 commit comments

Comments
 (0)