diff --git a/crates/oxc_traverse/src/context/mod.rs b/crates/oxc_traverse/src/context/mod.rs index 24d7e87bf7232..5a06285a0723c 100644 --- a/crates/oxc_traverse/src/context/mod.rs +++ b/crates/oxc_traverse/src/context/mod.rs @@ -545,12 +545,12 @@ impl<'a> TraverseCtx<'a> { /// Determine whether evaluating the specific input `node` is a consequenceless reference. /// - /// I.E evaluating it won't result in potentially arbitrary code from being ran. The following are - /// allowed and determined not to cause side effects: + /// i.e. evaluating it won't result in potentially arbitrary code from being run. + /// The following are allowed and determined not to cause side effects: /// /// - `this` expressions /// - `super` expressions - /// - Bound identifiers + /// - Bound identifiers which are not mutated /// /// This is a shortcut for `ctx.scoping.is_static`. #[inline] diff --git a/crates/oxc_traverse/src/context/scoping.rs b/crates/oxc_traverse/src/context/scoping.rs index 9c8b3c405dfbb..06d61cf630041 100644 --- a/crates/oxc_traverse/src/context/scoping.rs +++ b/crates/oxc_traverse/src/context/scoping.rs @@ -353,18 +353,15 @@ impl TraverseScoping { /// Determine whether evaluating the specific input `node` is a consequenceless reference. /// - /// I.E evaluating it won't result in potentially arbitrary code from being ran. The following are - /// allowed and determined not to cause side effects: + /// i.e. evaluating it won't result in potentially arbitrary code from being run. + /// The following are allowed and determined not to cause side effects: /// /// - `this` expressions /// - `super` expressions - /// - Bound identifiers + /// - Bound identifiers which are not mutated /// /// Based on Babel's `scope.isStatic` logic. /// - /// - /// # Panics - /// Can only panic if [`IdentifierReference`] does not have a reference_id, which it always should. #[inline] pub fn is_static(&self, expr: &Expression) -> bool { match expr {