diff --git a/crates/swc/src/config/mod.rs b/crates/swc/src/config/mod.rs index dc724ada2e6..9a524d68b50 100644 --- a/crates/swc/src/config/mod.rs +++ b/crates/swc/src/config/mod.rs @@ -1291,12 +1291,16 @@ fn default_jsonify_min_cost() -> usize { 1024 } -#[derive(Debug, Default, Clone, Copy, Serialize, Deserialize)] +#[derive(Debug, Clone, Copy, Serialize, Deserialize)] #[serde(deny_unknown_fields, rename_all = "camelCase")] pub struct ErrorConfig { - #[serde(default = "true_by_default")] pub filename: bool, } +impl Default for ErrorConfig { + fn default() -> Self { + ErrorConfig { filename: true } + } +} #[derive(Debug, Default, Clone, Serialize, Deserialize)] #[serde(deny_unknown_fields, rename_all = "camelCase")] diff --git a/crates/swc_ecma_codegen/src/macros.rs b/crates/swc_ecma_codegen/src/macros.rs index a08ac6f1165..81d56445648 100644 --- a/crates/swc_ecma_codegen/src/macros.rs +++ b/crates/swc_ecma_codegen/src/macros.rs @@ -100,6 +100,7 @@ macro_rules! semi { }; } +/// /// - `srcmap!(true)` for start (span.lo) /// - `srcmap!(false)` for end (span.hi) macro_rules! srcmap {