Bring back AsId, deprecated (#8586)

Removing `AsId` broke downstream crates that name the trait in their own
bounds or re-exports. It is back, but `#[deprecated]`

* https://github.com/emilk/egui/pull/8584

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Emil ErnerfeldtandClaude Opus 5 authored and GitHub committed 2026-09-17 15:55:28 +02:00
1 parent 3690fb5b0e
commit 2007ec324b
2 files changed
+10

No files matched your search

+7
View File
@@ -4,6 +4,13 @@ use core::num::NonZeroU64;
use crate::{AsIdSalt, IdSalt};
/// Deprecated
#[deprecated = "Use AsIdSalt or Id instead"]
pub trait AsId: core::hash::Hash + core::fmt::Debug {}
#[expect(deprecated)]
impl<T: core::hash::Hash + core::fmt::Debug> AsId for T {}
/// A (hopefully) unique identity within this application.
///
/// egui tracks widgets frame-to-frame using [`Id`]s.
+3
View File
@@ -505,6 +505,9 @@ pub use self::{
widgets::*,
};
#[expect(deprecated)]
pub use self::id::AsId;
// ----------------------------------------------------------------------------
/// Helper function that adds a label when compiling with debug assertions enabled.