From 55c07f2d4c850ae14a30796e5d9c1dac3aec81a4 Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Wed, 23 Oct 2024 10:47:29 +0000 Subject: [PATCH] docs(traverse): correct doc comment for `BoundIdentifier` (#6810) Docs were out of date. APIs have changed. --- crates/oxc_traverse/src/context/bound_identifier.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/oxc_traverse/src/context/bound_identifier.rs b/crates/oxc_traverse/src/context/bound_identifier.rs index df6382d6c..ad1bc5616 100644 --- a/crates/oxc_traverse/src/context/bound_identifier.rs +++ b/crates/oxc_traverse/src/context/bound_identifier.rs @@ -13,9 +13,9 @@ use crate::TraverseCtx; /// /// ```rs /// // Generate a UID for a top-level var -/// let binding = BoundIdentifier::new_root_uid("foo", SymbolFlags::FunctionScopedVariable, ctx); +/// let binding = ctx.generate_uid_in_current_scope("foo", SymbolFlags::FunctionScopedVariable); /// -/// // Generate an `IdentifierReference`s and insert them into AST +/// // Generate `IdentifierReference`s and insert them into AST /// some_node.id = binding.create_read_reference(ctx); /// some_other_node.id = binding.create_read_reference(ctx); /// @@ -23,7 +23,7 @@ use crate::TraverseCtx; /// self.foo_binding = binding; /// /// // Later on in `exit_program` -/// let id = binding.create_binding_identifier(); +/// let id = self.foo_binding.create_binding_identifier(ctx); /// // Insert `var = something;` into `program.body` /// ``` ///