Skip to content

Commit

Permalink
Update crates/oxc_syntax/src/reference.rs
Browse files Browse the repository at this point in the history
Co-authored-by: overlookmotel <[email protected]>
  • Loading branch information
IWANABETHATGUY and overlookmotel committed Jan 22, 2025
1 parent a63bb39 commit 7d2714a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions crates/oxc_syntax/src/reference.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@ pub struct ReferenceId(NonMaxU32);
impl<'alloc> CloneIn<'alloc> for ReferenceId {
type Cloned = Self;

fn clone_in(&self, _: &'alloc oxc_allocator::Allocator) -> Self::Cloned {
fn clone_in(&self, _: &'alloc Allocator) -> Self {
// `clone_in` should never reach this, because `CloneIn` skips semantic ID fields
unreachable!();
}

fn clone_in_with_semantic_ids(&self, _: &'alloc Allocator) -> Self {
*self
}
}

impl Idx for ReferenceId {
#[allow(clippy::cast_possible_truncation)]
fn from_usize(idx: usize) -> Self {
Expand Down

0 comments on commit 7d2714a

Please sign in to comment.