diff --git a/crates/rome_rowan/src/syntax.rs b/crates/rome_rowan/src/syntax.rs index e61fca767cf5..1a66016b1b25 100644 --- a/crates/rome_rowan/src/syntax.rs +++ b/crates/rome_rowan/src/syntax.rs @@ -11,7 +11,7 @@ pub use trivia::{ TriviaPieceKind, }; -pub use element::SyntaxElement; +pub use element::{SyntaxElement, SyntaxElementKey}; pub(crate) use node::SyntaxSlots; pub use node::{ Preorder, PreorderWithTokens, SendNode, SyntaxElementChildren, SyntaxNode, SyntaxNodeChildren, diff --git a/crates/rome_rowan/src/syntax/element.rs b/crates/rome_rowan/src/syntax/element.rs index 1a8262dece10..b071a6a541bb 100644 --- a/crates/rome_rowan/src/syntax/element.rs +++ b/crates/rome_rowan/src/syntax/element.rs @@ -124,7 +124,7 @@ impl From> for SyntaxElement { } } -#[derive(Copy, Clone, Eq, PartialEq)] +#[derive(Copy, Clone, Eq, PartialEq, Hash)] pub struct SyntaxElementKey { node_data: NonNull<()>, offset: TextSize,