79783494

Date: 2025-10-06 09:09:54
Score: 2
Natty:
Report link

A crate exists that solves this particular problem. Using the example given by @paholg:

use std::ops::Deref;

use disjoint_impls::disjoint_impls;

disjoint_impls! {
    trait Foo {}

    impl<T> Foo for T where T: Deref<Target = u8> {}
    impl<T> Foo for T where T: Deref<Target = bool> {}
}

fn main() {}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • User mentioned (1): @paholg
  • Low reputation (1):
Posted by: Yoyo Transfers