Skip to content

Generated impls Are Using bool instead of ::core::primitive::bool #133

@TheVeryDarkness

Description

@TheVeryDarkness

Thanks for this crate!

However, recently I found one point to improve in this crate. As generated impls 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:

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>,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions