docs: use oxc_index instead of index_vec in doc comments (#5423)

This commit is contained in:
IWANABETHATGUY 2024-09-03 11:57:27 +00:00
parent 4473779074
commit 00511fd6a8
2 changed files with 8 additions and 8 deletions

View file

@ -5,9 +5,9 @@
//!
//! ## Example / Overview
//! ```rust
//! use index_vec::{IndexVec, IndexSlice, index_vec};
//! use oxc_index::{IndexVec, IndexSlice, index_vec};
//!
//! index_vec::define_index_type! {
//! oxc_index::define_index_type! {
//! // Define StrIdx to use only 32 bits internally (you can use usize, u16,
//! // and even u8).
//! pub struct StrIdx = u32;

View file

@ -11,7 +11,7 @@
/// The rough usage pattern of this macro is:
///
/// ```rust,no_run
/// index_vec::define_index_type! {
/// oxc_index::define_index_type! {
/// // Note that isn't actually a type alias, `MyIndex` is
/// // actually defined as a struct. XXX is this too confusing?
/// pub struct MyIndex = u32;
@ -31,7 +31,7 @@
/// the macro uses to customize how the type it generates behaves. For example:
///
/// ```rust,no_run
/// index_vec::define_index_type! {
/// oxc_index::define_index_type! {
/// pub struct Span = u32;
///
/// // Don't allow any spans with values higher this.
@ -83,7 +83,7 @@
/// Example:
///
/// ```rust,no_run
/// index_vec::define_index_type! {
/// oxc_index::define_index_type! {
/// pub struct MyIdx = u16;
/// MAX_INDEX = (u16::max_value() - 1) as usize;
/// // Set the default index to be an invalid index, as
@ -101,7 +101,7 @@
/// the index. This can be done via `DEBUG_FORMAT`:
///
/// ```rust
/// index_vec::define_index_type! {
/// oxc_index::define_index_type! {
/// struct FooIdx = usize;
/// DEBUG_FORMAT = "Foo({})";
/// }
@ -119,7 +119,7 @@
/// the index type.
///
/// ```rust
/// index_vec::define_index_type! {
/// oxc_index::define_index_type! {
/// struct FooIdx = usize;
/// DISPLAY_FORMAT = "{}";
/// // Note that you can use both DEBUG_FORMAT and DISPLAY_FORMAT.
@ -141,7 +141,7 @@
/// via this option. It's an error to use this if your raw type is usize.
///
/// ```rust
/// index_vec::define_index_type! {
/// oxc_index::define_index_type! {
/// struct FooIdx = u32;
/// IMPL_RAW_CONVERSIONS = true;
/// }