@@ -4292,37 +4292,6 @@ impl<'a> AstBuilder<'a> {
4292
4292
Declaration :: ClassDeclaration ( inner. into_in ( self . allocator ) )
4293
4293
}
4294
4294
4295
- /// Build a [`Declaration::UsingDeclaration`]
4296
- ///
4297
- /// This node contains a [`UsingDeclaration`] that will be stored in the memory arena.
4298
- ///
4299
- /// ## Parameters
4300
- /// - span: The [`Span`] covering this node
4301
- /// - is_await
4302
- /// - declarations
4303
- #[ inline]
4304
- pub fn declaration_using (
4305
- self ,
4306
- span : Span ,
4307
- is_await : bool ,
4308
- declarations : Vec < ' a , VariableDeclarator < ' a > > ,
4309
- ) -> Declaration < ' a > {
4310
- Declaration :: UsingDeclaration ( self . alloc ( self . using_declaration (
4311
- span,
4312
- is_await,
4313
- declarations,
4314
- ) ) )
4315
- }
4316
-
4317
- /// Convert a [`UsingDeclaration`] into a [`Declaration::UsingDeclaration`]
4318
- #[ inline]
4319
- pub fn declaration_from_using < T > ( self , inner : T ) -> Declaration < ' a >
4320
- where
4321
- T : IntoIn < ' a , Box < ' a , UsingDeclaration < ' a > > > ,
4322
- {
4323
- Declaration :: UsingDeclaration ( inner. into_in ( self . allocator ) )
4324
- }
4325
-
4326
4295
/// Build a [`Declaration::TSTypeAliasDeclaration`]
4327
4296
///
4328
4297
/// This node contains a [`TSTypeAliasDeclaration`] that will be stored in the memory arena.
@@ -4591,42 +4560,6 @@ impl<'a> AstBuilder<'a> {
4591
4560
Box :: new_in ( self . variable_declarator ( span, kind, id, init, definite) , self . allocator )
4592
4561
}
4593
4562
4594
- /// Builds a [`UsingDeclaration`]
4595
- ///
4596
- /// If you want the built node to be allocated in the memory arena, use [`AstBuilder::alloc_using_declaration`] instead.
4597
- ///
4598
- /// ## Parameters
4599
- /// - span: The [`Span`] covering this node
4600
- /// - is_await
4601
- /// - declarations
4602
- #[ inline]
4603
- pub fn using_declaration (
4604
- self ,
4605
- span : Span ,
4606
- is_await : bool ,
4607
- declarations : Vec < ' a , VariableDeclarator < ' a > > ,
4608
- ) -> UsingDeclaration < ' a > {
4609
- UsingDeclaration { span, is_await, declarations }
4610
- }
4611
-
4612
- /// Builds a [`UsingDeclaration`] and stores it in the memory arena.
4613
- ///
4614
- /// Returns a [`Box`] containing the newly-allocated node. If you want a stack-allocated node, use [`AstBuilder::using_declaration`] instead.
4615
- ///
4616
- /// ## Parameters
4617
- /// - span: The [`Span`] covering this node
4618
- /// - is_await
4619
- /// - declarations
4620
- #[ inline]
4621
- pub fn alloc_using_declaration (
4622
- self ,
4623
- span : Span ,
4624
- is_await : bool ,
4625
- declarations : Vec < ' a , VariableDeclarator < ' a > > ,
4626
- ) -> Box < ' a , UsingDeclaration < ' a > > {
4627
- Box :: new_in ( self . using_declaration ( span, is_await, declarations) , self . allocator )
4628
- }
4629
-
4630
4563
/// Builds a [`EmptyStatement`]
4631
4564
///
4632
4565
/// If you want the built node to be allocated in the memory arena, use [`AstBuilder::alloc_empty_statement`] instead.
@@ -4871,37 +4804,6 @@ impl<'a> AstBuilder<'a> {
4871
4804
ForStatementInit :: VariableDeclaration ( inner. into_in ( self . allocator ) )
4872
4805
}
4873
4806
4874
- /// Build a [`ForStatementInit::UsingDeclaration`]
4875
- ///
4876
- /// This node contains a [`UsingDeclaration`] that will be stored in the memory arena.
4877
- ///
4878
- /// ## Parameters
4879
- /// - span: The [`Span`] covering this node
4880
- /// - is_await
4881
- /// - declarations
4882
- #[ inline]
4883
- pub fn for_statement_init_using_declaration (
4884
- self ,
4885
- span : Span ,
4886
- is_await : bool ,
4887
- declarations : Vec < ' a , VariableDeclarator < ' a > > ,
4888
- ) -> ForStatementInit < ' a > {
4889
- ForStatementInit :: UsingDeclaration ( self . alloc ( self . using_declaration (
4890
- span,
4891
- is_await,
4892
- declarations,
4893
- ) ) )
4894
- }
4895
-
4896
- /// Convert a [`UsingDeclaration`] into a [`ForStatementInit::UsingDeclaration`]
4897
- #[ inline]
4898
- pub fn for_statement_init_from_using_declaration < T > ( self , inner : T ) -> ForStatementInit < ' a >
4899
- where
4900
- T : IntoIn < ' a , Box < ' a , UsingDeclaration < ' a > > > ,
4901
- {
4902
- ForStatementInit :: UsingDeclaration ( inner. into_in ( self . allocator ) )
4903
- }
4904
-
4905
4807
#[ inline]
4906
4808
pub fn for_statement_init_expression ( self , inner : Expression < ' a > ) -> ForStatementInit < ' a > {
4907
4809
ForStatementInit :: from ( inner)
@@ -4981,37 +4883,6 @@ impl<'a> AstBuilder<'a> {
4981
4883
ForStatementLeft :: VariableDeclaration ( inner. into_in ( self . allocator ) )
4982
4884
}
4983
4885
4984
- /// Build a [`ForStatementLeft::UsingDeclaration`]
4985
- ///
4986
- /// This node contains a [`UsingDeclaration`] that will be stored in the memory arena.
4987
- ///
4988
- /// ## Parameters
4989
- /// - span: The [`Span`] covering this node
4990
- /// - is_await
4991
- /// - declarations
4992
- #[ inline]
4993
- pub fn for_statement_left_using_declaration (
4994
- self ,
4995
- span : Span ,
4996
- is_await : bool ,
4997
- declarations : Vec < ' a , VariableDeclarator < ' a > > ,
4998
- ) -> ForStatementLeft < ' a > {
4999
- ForStatementLeft :: UsingDeclaration ( self . alloc ( self . using_declaration (
5000
- span,
5001
- is_await,
5002
- declarations,
5003
- ) ) )
5004
- }
5005
-
5006
- /// Convert a [`UsingDeclaration`] into a [`ForStatementLeft::UsingDeclaration`]
5007
- #[ inline]
5008
- pub fn for_statement_left_from_using_declaration < T > ( self , inner : T ) -> ForStatementLeft < ' a >
5009
- where
5010
- T : IntoIn < ' a , Box < ' a , UsingDeclaration < ' a > > > ,
5011
- {
5012
- ForStatementLeft :: UsingDeclaration ( inner. into_in ( self . allocator ) )
5013
- }
5014
-
5015
4886
#[ inline]
5016
4887
pub fn for_statement_left_assignment_target (
5017
4888
self ,
0 commit comments