diff --git a/packages/emotion/transform/src/lib.rs b/packages/emotion/transform/src/lib.rs index 389dbb81f..d2294d0c9 100644 --- a/packages/emotion/transform/src/lib.rs +++ b/packages/emotion/transform/src/lib.rs @@ -588,13 +588,13 @@ impl Fold for EmotionTransformer { args: expr.args, callee: CallExpr { span: DUMMY_SP, - type_args: None, callee: Ident::new(i.sym.clone(), i.span, i.ctxt) .as_callee(), args, ..Default::default() } .as_callee(), + ..Default::default() }; } } @@ -671,7 +671,7 @@ impl Fold for EmotionTransformer { if self.options.auto_label.unwrap_or(false) { object_props.push(PropOrSpread::Prop(Box::new( Prop::KeyValue(KeyValueProp { - key: PropName::Ident(Ident::new( + key: PropName::Ident(IdentName::new( "label".into(), DUMMY_SP, )), @@ -732,7 +732,7 @@ impl Fold for EmotionTransformer { } args }, - type_args: None, + ..Default::default() }); } } @@ -754,10 +754,9 @@ impl Fold for EmotionTransformer { } } return Expr::Call(CallExpr { - span: DUMMY_SP, callee: i.take().as_callee(), args, - type_args: None, + ..Default::default() }); } } @@ -774,7 +773,7 @@ impl Fold for EmotionTransformer { if self.options.auto_label.unwrap_or(false) { object_props.push(PropOrSpread::Prop(Box::new( Prop::KeyValue(KeyValueProp { - key: PropName::Ident(Ident::new( + key: PropName::Ident(IdentName::new( "label".into(), DUMMY_SP, )), @@ -793,11 +792,7 @@ impl Fold for EmotionTransformer { self.comments.add_pure_comment(member_expr.span.lo()); return Expr::Call(CallExpr { - span: DUMMY_SP, - type_args: None, callee: CallExpr { - type_args: None, - span: DUMMY_SP, callee: i.take().as_callee(), args: vec![ prop.take().sym.as_arg(), @@ -807,9 +802,11 @@ impl Fold for EmotionTransformer { }) .as_arg(), ], + ..Default::default() } .as_callee(), args, + ..Default::default() }); } } @@ -820,7 +817,6 @@ impl Fold for EmotionTransformer { { self.comments.add_pure_comment(member_expr.span.lo()); return Expr::Call(CallExpr { - span: DUMMY_SP, callee: member_expr.take().as_callee(), args: { let mut args = self.create_args_from_tagged_tpl( @@ -836,7 +832,7 @@ impl Fold for EmotionTransformer { } args }, - type_args: None, + ..Default::default() }); } } diff --git a/packages/jest/src/lib.rs b/packages/jest/src/lib.rs index 7202bade0..5e3028656 100644 --- a/packages/jest/src/lib.rs +++ b/packages/jest/src/lib.rs @@ -59,18 +59,18 @@ impl Jest { ) => match &*callee.obj { Expr::Ident(i) if i.sym == *"jest" => match prop { _ if HOIST_METHODS.contains(&*prop.sym) => { - hoisted.push(T::from_stmt(stmt)); + hoisted.push(T::from(stmt)); } - _ => new.push(T::from_stmt(stmt)), + _ => new.push(T::from(stmt)), }, - _ => new.push(T::from_stmt(stmt)), + _ => new.push(T::from(stmt)), }, - _ => new.push(T::from_stmt(stmt)), + _ => new.push(T::from(stmt)), }, - _ => new.push(T::from_stmt(stmt)), + _ => new.push(T::from(stmt)), }, - _ => new.push(T::from_stmt(stmt)), + _ => new.push(T::from(stmt)), }, Err(node) => new.push(node), }; diff --git a/packages/loadable-components/src/lib.rs b/packages/loadable-components/src/lib.rs index bb67be2d8..0cdac7249 100644 --- a/packages/loadable-components/src/lib.rs +++ b/packages/loadable-components/src/lib.rs @@ -321,19 +321,16 @@ where key: PropName::Ident(quote_ident!("chunkName")), function: Box::new(Function { params: clone_params(func), - decorators: Default::default(), - span: DUMMY_SP, body: Some(BlockStmt { - span: DUMMY_SP, stmts: vec![Stmt::Return(ReturnStmt { span: DUMMY_SP, arg: Some(Box::new(self.replace_chunk_name(import))), })], + ..Default::default() }), is_generator: false, is_async: false, - type_params: Default::default(), - return_type: Default::default(), + ..Default::default() }), } } @@ -347,8 +344,6 @@ where decorators: Default::default(), pat: Pat::Ident(quote_ident!("props").into()), }], - decorators: Default::default(), - span: DUMMY_SP, body: Some( quote!( " @@ -370,8 +365,7 @@ where ), is_generator: false, is_async: false, - type_params: Default::default(), - return_type: Default::default(), + ..Default::default() }), } }