Skip to content

Commit 611b029

Browse files
committed
feat(ast)!: remove AstBuilder::copy (oxc-project#9210)
close: oxc-project#3483
1 parent 558ed8b commit 611b029

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

crates/oxc_ast/src/ast_builder_impl.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,6 @@ impl<'a> AstBuilder<'a> {
9494
}
9595
}
9696

97-
/// # SAFETY
98-
/// This method is completely unsound and should not be used.
99-
/// We need to remove all uses of it. Please don't add any more!
100-
/// <https://github.com/oxc-project/oxc/issues/3483>
101-
#[expect(clippy::missing_safety_doc)]
102-
#[inline]
103-
pub unsafe fn copy<T>(self, src: &T) -> T {
104-
// SAFETY: Not safe (see above)
105-
unsafe { std::mem::transmute_copy(src) }
106-
}
107-
10897
/// Moves the expression out by replacing it with an [`Expression::NullLiteral`].
10998
#[inline]
11099
pub fn move_expression(self, expr: &mut Expression<'a>) -> Expression<'a> {

0 commit comments

Comments
 (0)