From 8cf9766be334f9940236246bd3392d4e6305ad2f Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Sat, 14 Dec 2024 01:52:32 +0000 Subject: [PATCH] refactor(semantic, syntax, wasm): remove `#![allow(non_snake_case)]` (#7863) `#![allow(non_snake_case)]` was required in files using `#[derive(Tsify)]`, as a bug in Rust Analyser caused erroneous warnings. This appears to be fixed now, so we can remove these `#![allow]` attributes. --- crates/oxc_semantic/src/reference.rs | 3 --- crates/oxc_semantic/src/symbol.rs | 2 -- crates/oxc_syntax/src/operator.rs | 2 -- crates/oxc_wasm/src/lib.rs | 3 --- wasm/parser/src/lib.rs | 2 -- 5 files changed, 12 deletions(-) diff --git a/crates/oxc_semantic/src/reference.rs b/crates/oxc_semantic/src/reference.rs index 544e17d8887fd..12ac10ecd6b60 100644 --- a/crates/oxc_semantic/src/reference.rs +++ b/crates/oxc_semantic/src/reference.rs @@ -1,6 +1,3 @@ -// Silence erroneous warnings from Rust Analyser for `#[derive(Tsify)]` -#![allow(non_snake_case)] - #[cfg(feature = "serialize")] use serde::Serialize; #[cfg(feature = "serialize")] diff --git a/crates/oxc_semantic/src/symbol.rs b/crates/oxc_semantic/src/symbol.rs index e03741eb0988d..2ef0a176be4fc 100644 --- a/crates/oxc_semantic/src/symbol.rs +++ b/crates/oxc_semantic/src/symbol.rs @@ -1,5 +1,3 @@ -#![allow(non_snake_case)] // Silence erroneous warnings from Rust Analyser for `#[derive(Tsify)]` - #[cfg(feature = "serialize")] use serde::Serialize; #[cfg(feature = "serialize")] diff --git a/crates/oxc_syntax/src/operator.rs b/crates/oxc_syntax/src/operator.rs index 1b4040ab370d1..6c1c40cb64337 100644 --- a/crates/oxc_syntax/src/operator.rs +++ b/crates/oxc_syntax/src/operator.rs @@ -1,8 +1,6 @@ //! ECMAScript operators. //! //! Not all operators are punctuation - some, such as `delete`, are keywords. -// Silence erroneous warnings from Rust Analyser for `#[derive(Tsify)]` -#![allow(non_snake_case)] use oxc_allocator::CloneIn; use oxc_ast_macros::ast; diff --git a/crates/oxc_wasm/src/lib.rs b/crates/oxc_wasm/src/lib.rs index e7f02b14dfe15..6ac500c8f9de2 100644 --- a/crates/oxc_wasm/src/lib.rs +++ b/crates/oxc_wasm/src/lib.rs @@ -1,6 +1,3 @@ -// Silence erroneous warnings from Rust Analyser for `#[derive(Tsify)]` -#![allow(non_snake_case)] - mod options; use std::{ diff --git a/wasm/parser/src/lib.rs b/wasm/parser/src/lib.rs index 7a26a4706b244..85e68fd14dd89 100644 --- a/wasm/parser/src/lib.rs +++ b/wasm/parser/src/lib.rs @@ -1,5 +1,3 @@ -// Silence erroneous warnings from Rust Analyser for `#[derive(Tsify)]` -#![allow(non_snake_case)] #![allow(clippy::needless_pass_by_value)] use oxc::{allocator::Allocator, parser::Parser, span::SourceType};