diff --git a/crates/bevy_asset/src/handle.rs b/crates/bevy_asset/src/handle.rs index afed919568..f3f4cddeed 100644 --- a/crates/bevy_asset/src/handle.rs +++ b/crates/bevy_asset/src/handle.rs @@ -150,7 +150,10 @@ impl Clone for Handle { impl Handle { /// Create a new [`Handle::Weak`] with the given [`u128`] encoding of a [`Uuid`]. - #[deprecated = "use the `weak_handle!` macro with a UUID string instead"] + #[deprecated( + since = "0.16.0", + note = "use the `weak_handle!` macro with a UUID string instead" + )] pub const fn weak_from_u128(value: u128) -> Self { Handle::Weak(AssetId::Uuid { uuid: Uuid::from_u128(value), diff --git a/crates/bevy_ecs/src/entity/mod.rs b/crates/bevy_ecs/src/entity/mod.rs index faa97083ba..70b70e2695 100644 --- a/crates/bevy_ecs/src/entity/mod.rs +++ b/crates/bevy_ecs/src/entity/mod.rs @@ -244,6 +244,7 @@ impl Hash for Entity { } #[deprecated( + since = "0.16.0", note = "This is exclusively used with the now deprecated `Entities::alloc_at_without_replacement`." )] pub(crate) enum AllocAtWithoutReplacement { @@ -694,6 +695,7 @@ impl Entities { /// Returns the location of the entity currently using the given ID, if any. Location should be /// written immediately. #[deprecated( + since = "0.16.0", note = "This can cause extreme performance problems when used after freeing a large number of entities and requesting an arbitrary entity. See #18054 on GitHub." )] pub fn alloc_at(&mut self, entity: Entity) -> Option { @@ -728,6 +730,7 @@ impl Entities { /// /// Returns the location of the entity currently using the given ID, if any. #[deprecated( + since = "0.16.0", note = "This can cause extreme performance problems when used after freeing a large number of entities and requesting an arbitrary entity. See #18054 on GitHub." )] #[expect( diff --git a/crates/bevy_ecs/src/system/query.rs b/crates/bevy_ecs/src/system/query.rs index aa28903c8e..183bdecfb4 100644 --- a/crates/bevy_ecs/src/system/query.rs +++ b/crates/bevy_ecs/src/system/query.rs @@ -1532,7 +1532,10 @@ impl<'w, 's, D: QueryData, F: QueryFilter> Query<'w, 's, D, F> { /// - [`get_many`](Self::get_many) for the non-panicking version. #[inline] #[track_caller] - #[deprecated(note = "Use `get_many` instead and handle the Result.")] + #[deprecated( + since = "0.16.0", + note = "Use `get_many` instead and handle the Result." + )] pub fn many(&self, entities: [Entity; N]) -> [ROQueryItem<'_, D>; N] { match self.get_many(entities) { Ok(items) => items, @@ -1929,7 +1932,10 @@ impl<'w, 's, D: QueryData, F: QueryFilter> Query<'w, 's, D, F> { /// - [`many`](Self::many) to get read-only query items. #[inline] #[track_caller] - #[deprecated(note = "Use `get_many_mut` instead and handle the Result.")] + #[deprecated( + since = "0.16.0", + note = "Use `get_many_mut` instead and handle the Result." + )] pub fn many_mut(&mut self, entities: [Entity; N]) -> [D::Item<'_>; N] { match self.get_many_mut(entities) { Ok(items) => items, @@ -1993,7 +1999,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> Query<'w, 's, D, F> { } /// A deprecated alias for [`single`](Self::single). - #[deprecated(note = "Please use `single` instead")] + #[deprecated(since = "0.16.0", note = "Please use `single` instead")] pub fn get_single(&self) -> Result, QuerySingleError> { self.single() } @@ -2028,7 +2034,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> Query<'w, 's, D, F> { } /// A deprecated alias for [`single_mut`](Self::single_mut). - #[deprecated(note = "Please use `single_mut` instead")] + #[deprecated(since = "0.16.0", note = "Please use `single_mut` instead")] pub fn get_single_mut(&mut self) -> Result, QuerySingleError> { self.single_mut() } diff --git a/crates/bevy_ecs/src/world/mod.rs b/crates/bevy_ecs/src/world/mod.rs index 5aa87524e3..ad016f9e8a 100644 --- a/crates/bevy_ecs/src/world/mod.rs +++ b/crates/bevy_ecs/src/world/mod.rs @@ -2253,6 +2253,7 @@ impl World { /// ``` #[track_caller] #[deprecated( + since = "0.16.0", note = "This can cause extreme performance problems when used with lots of arbitrary free entities. See #18054 on GitHub." )] pub fn insert_or_spawn_batch(&mut self, iter: I) -> Result<(), Vec> @@ -2272,6 +2273,7 @@ impl World { /// as a command. #[inline] #[deprecated( + since = "0.16.0", note = "This can cause extreme performance problems when used with lots of arbitrary free entities. See #18054 on GitHub." )] pub(crate) fn insert_or_spawn_batch_with_caller(