Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/fresh-deref-patterns.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@swc/plugin-styled-jsx": major
"@swc/plugin-swc-confidential": major
"@swc/plugin-swc-magic": major
"@swc/plugin-swc-sdk": major
---

Migrate from Rust `box_patterns` to `deref_patterns` and update the pinned toolchain to `nightly-2026-04-10`.
2 changes: 1 addition & 1 deletion packages/styled-jsx/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![allow(clippy::not_unsafe_ptr_arg_deref)]
#![feature(box_patterns)]
#![feature(deref_patterns)]

use styled_jsx::{visitor, visitor::Config};
use swc_core::{
Expand Down
2 changes: 1 addition & 1 deletion packages/styled-jsx/transform/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(box_patterns)]
#![feature(deref_patterns)]
pub mod style;
mod transform_css_lightningcss;
mod transform_css_swc;
Expand Down
2 changes: 1 addition & 1 deletion packages/styled-jsx/transform/src/visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ fn add_hash_statement((id, hash): (Id, String)) -> Stmt {

fn is_styled_css_import(item: &ModuleItem) -> bool {
if let ModuleItem::ModuleDecl(ModuleDecl::Import(ImportDecl {
src: box Str { value, .. },
src: Str { value, .. },
..
})) = item
{
Expand Down
2 changes: 1 addition & 1 deletion packages/swc-confidential/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![allow(clippy::not_unsafe_ptr_arg_deref)]
#![feature(box_patterns)]
#![feature(deref_patterns)]

use swc_core::{
ecma::{ast::Program, visit::VisitMutWith},
Expand Down
2 changes: 1 addition & 1 deletion packages/swc-confidential/transform/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(box_patterns)]
#![feature(deref_patterns)]

use magic_crypt::{new_magic_crypt, MagicCryptTrait};
use serde::Deserialize;
Expand Down
2 changes: 1 addition & 1 deletion packages/swc-magic/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![allow(clippy::not_unsafe_ptr_arg_deref)]
#![feature(box_patterns)]
#![feature(deref_patterns)]

use swc_core::{
ecma::{ast::Program, visit::VisitMutWith},
Expand Down
2 changes: 1 addition & 1 deletion packages/swc-magic/transform/src/import_analyzer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl ImportMap {
}

Expr::Member(MemberExpr {
obj: box Expr::Ident(obj),
obj: Expr::Ident(obj),
prop: MemberProp::Ident(prop),
..
}) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/swc-magic/transform/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(box_patterns)]
#![feature(deref_patterns)]

use import_analyzer::ImportMap;
use serde::Deserialize;
Expand Down
2 changes: 1 addition & 1 deletion packages/swc-sdk/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![allow(clippy::not_unsafe_ptr_arg_deref)]
#![feature(box_patterns)]
#![feature(deref_patterns)]

use swc_core::{
ecma::{ast::Program, visit::VisitMutWith},
Expand Down
4 changes: 2 additions & 2 deletions packages/swc-sdk/transform/src/import_analyzer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl ImportMap {
}

Expr::Member(MemberExpr {
obj: box Expr::Ident(obj),
obj: Expr::Ident(obj),
prop: MemberProp::Ident(prop),
..
}) => {
Expand Down Expand Up @@ -75,7 +75,7 @@ impl ImportMap {
}

Expr::Member(MemberExpr {
obj: box Expr::Ident(obj),
obj: Expr::Ident(obj),
prop: MemberProp::Ident(prop),
..
}) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/swc-sdk/transform/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(box_patterns)]
#![feature(deref_patterns)]
#![feature(never_type)]

use swc_common::{comments::Comments, errors::HANDLER, util::take::Take, Mark, DUMMY_SP};
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "nightly-2025-05-06"
channel = "nightly-2026-04-10"
components = ["rustfmt", "clippy"]
profile = "minimal"
targets = ["wasm32-unknown-unknown", "wasm32-wasip1"]
Loading