-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
oxc-project/oxc
#3970Description
we have these index types
where
can be trimmed by niche optimization.
But,
use std::num::NonZeroU32;
define_index_type! {
pub struct ReferenceId = NonZeroU32;
}is not supported by the macro define_index_type
error[E0599]: no function or associated item named `max_value` found for struct `NonZero` in the current scope
--> crates/oxc_syntax/src/reference.rs:7:1
|
7 | / define_index_type! {
8 | | pub struct ReferenceId = NonZeroU32;
9 | | }
| |_^ function or associated item not found in `NonZero<u32>`
|
note: if you're trying to build a new `NonZero<u32>` consider using one of the following associated functions:
NonZero::<T>::new
NonZero::<T>::new_unchecked
--> /Users/boshen/.rustup/toolchains/1.78.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/num/nonzero.rs:308:5
but the good news is that we forked it and lives in https://github.com/oxc-project/oxc/tree/main/crates/oxc_index
The task of this issue is to make it work, if possible.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels