Skip to content

Explicitly defining bounds with multiple traits leads to spurious bounds #23

Description

@Ekleog

The following code:

#[derive(Educe)]
#[educe(Clone, Debug(bound(T: Debug)))]
pub struct Obj<T: Object, LocalDb: ClientSideDb> {
    ptr: DbPtr<T>,
    data: Arc<T>,

    #[educe(Debug(ignore))]
    db: Arc<ClientDb<LocalDb>>,
}

Leads to the Clone impl having a T: Debug bound, while I'd expect only the Debug implementation to have this bound.

Unfortunately I guess fixing this will require bumping educe to 0.6, as it's technically a breaking change, though it's also a bugfix.

PS: sorry for the non-minimized example, I'm in a hurry and just copy-pasted my current code; hopefully it'd also reproduce with an empty struct as expected! If not please let me know and I'll try to make a minimized example.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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