ITADN

Generated `impl`s Are Using `bool` instead of `::core::primitive::bool`

#133ClosedTheVeryDarkness 创建于 2025-11-18
T
TheVeryDarknesscommented
Thanks for this crate! However, recently I found one point to improve in this crate. As generated `impl`s are using `bool` instead of `::core::primitive::bool` to reference the primitive `bool` type, there will be a compile error if there is another `bool` type in scope. See the example below: ```rust use std::marker::PhantomData; use derive_where::derive_where; #[allow(non_camel_case_types)] struct bool; #[derive_where(Clone, Hash, PartialEq, Eq)] struct A<T> { a: usize, b: PhantomData<T>, } ```
关闭于 2025-12-19 1 条评论