diff --git a/crates/oxc_cfg/src/visit.rs b/crates/oxc_cfg/src/visit.rs index a30f0ed7e53fa..5264b339877ec 100644 --- a/crates/oxc_cfg/src/visit.rs +++ b/crates/oxc_cfg/src/visit.rs @@ -138,9 +138,9 @@ where unreachable!() ); } else if !finished.is_visited(&v) { - try_control!(visitor(DfsEvent::BackEdge(u, v)), continue); + try_control!(visitor(DfsEvent::BackEdge(u, v)), {}); } else { - try_control!(visitor(DfsEvent::CrossForwardEdge(u, v)), continue); + try_control!(visitor(DfsEvent::CrossForwardEdge(u, v)), {}); } } ); diff --git a/crates/oxc_data_structures/src/assert_unchecked.rs b/crates/oxc_data_structures/src/assert_unchecked.rs index e9ddd75adbbb1..33f33761d1a92 100644 --- a/crates/oxc_data_structures/src/assert_unchecked.rs +++ b/crates/oxc_data_structures/src/assert_unchecked.rs @@ -60,8 +60,6 @@ const _MACRO_CANNOT_BE_USED_WITHOUT_UNSAFE: () = (); #[expect(clippy::undocumented_unsafe_blocks)] mod test { mod pass { - use crate::assert_unchecked; - #[test] fn plain() { unsafe { assert_unchecked!(0 == 0) }; diff --git a/crates/oxc_span/src/compact_str.rs b/crates/oxc_span/src/compact_str.rs index 2457270c1a6af..248f9daf30edc 100644 --- a/crates/oxc_span/src/compact_str.rs +++ b/crates/oxc_span/src/compact_str.rs @@ -258,8 +258,6 @@ macro_rules! format_compact_str { mod test { use compact_str::CompactString; - use crate::format_compact_str; - use super::CompactStr; #[test] diff --git a/crates/oxc_transformer/src/typescript/module.rs b/crates/oxc_transformer/src/typescript/module.rs index 636ce8910e3ce..a44bdc7697ae0 100644 --- a/crates/oxc_transformer/src/typescript/module.rs +++ b/crates/oxc_transformer/src/typescript/module.rs @@ -171,7 +171,7 @@ impl<'a> TypeScriptModule<'a, '_> { Some(ctx.ast.declaration_variable(SPAN, kind, decls, false)) } - #[expect(clippy::only_used_in_recursion)] + #[expect(clippy::self_only_used_in_recursion)] fn transform_ts_type_name( &self, type_name: &mut TSTypeName<'a>, diff --git a/crates/oxc_traverse/scripts/lib/ancestor.mjs b/crates/oxc_traverse/scripts/lib/ancestor.mjs index 2b5104c50df1e..2fb38c45f33f4 100644 --- a/crates/oxc_traverse/scripts/lib/ancestor.mjs +++ b/crates/oxc_traverse/scripts/lib/ancestor.mjs @@ -147,7 +147,7 @@ export default function generateAncestorsCode(types) { /// i.e. \`Ancestor\`s can only exist within the body of \`enter_*\` and \`exit_*\` methods /// and cannot "escape" from them. // - // SAFETY: + // INVARIANTS: // * This type must be \`#[repr(u16)]\`. // * Variant discriminants must correspond to those in \`AncestorType\`. // diff --git a/crates/oxc_traverse/scripts/lib/walk.mjs b/crates/oxc_traverse/scripts/lib/walk.mjs index 4a54e87e02a7d..68476c4e44b4e 100644 --- a/crates/oxc_traverse/scripts/lib/walk.mjs +++ b/crates/oxc_traverse/scripts/lib/walk.mjs @@ -42,7 +42,7 @@ export default function generateWalkFunctionsCode(types) { /// Walk AST with \`Traverse\` impl. /// - /// SAFETY: + /// # Safety /// * \`program\` must be a pointer to a valid \`Program\` which has lifetime \`'a\` /// (\`Program<'a>\`). /// * \`ctx\` must contain a \`TraverseAncestry<'a>\` with single \`Ancestor::None\` on its stack. diff --git a/crates/oxc_traverse/src/generated/ancestor.rs b/crates/oxc_traverse/src/generated/ancestor.rs index 015001aa4302c..d486e1013c4a3 100644 --- a/crates/oxc_traverse/src/generated/ancestor.rs +++ b/crates/oxc_traverse/src/generated/ancestor.rs @@ -329,7 +329,7 @@ pub(crate) enum AncestorType { /// i.e. `Ancestor`s can only exist within the body of `enter_*` and `exit_*` methods /// and cannot "escape" from them. // -// SAFETY: +// INVARIANTS: // * This type must be `#[repr(u16)]`. // * Variant discriminants must correspond to those in `AncestorType`. // diff --git a/crates/oxc_traverse/src/generated/walk.rs b/crates/oxc_traverse/src/generated/walk.rs index f566d009c22ca..21e318d174ad6 100644 --- a/crates/oxc_traverse/src/generated/walk.rs +++ b/crates/oxc_traverse/src/generated/walk.rs @@ -25,7 +25,7 @@ use crate::{ /// Walk AST with `Traverse` impl. /// -/// SAFETY: +/// # Safety /// * `program` must be a pointer to a valid `Program` which has lifetime `'a` /// (`Program<'a>`). /// * `ctx` must contain a `TraverseAncestry<'a>` with single `Ancestor::None` on its stack. diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 3ec291c482913..9cf77fc11c622 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.91.1" +channel = "1.92.0" profile = "default"