diff --git a/crates/egui/src/id.rs b/crates/egui/src/id.rs index cab9998d..82f5c17f 100644 --- a/crates/egui/src/id.rs +++ b/crates/egui/src/id.rs @@ -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 AsId for T {} + /// A (hopefully) unique identity within this application. /// /// egui tracks widgets frame-to-frame using [`Id`]s. diff --git a/crates/egui/src/lib.rs b/crates/egui/src/lib.rs index 0596f9a8..5a88b7ed 100644 --- a/crates/egui/src/lib.rs +++ b/crates/egui/src/lib.rs @@ -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.