Implement trait for value and reference

I found a working solution:

use std::borrow::Borrow;

trait MyTrait {
    fn doit<T>(value: T) where T: Borrow<Self>;
}

impl MyTrait for bool {
    fn doit<T>(_value: T) where T: Borrow<Self> {}
}

impl MyTrait for usize {
    fn doit<T>(_value: T) where T: Borrow<Self> {}
}


fn main() {
    bool::doit(true);
    bool::doit(&true);
    usize::doit(1usize);
    usize::doit(&1usize);
}

The generic type parameter had to be moved from the type to the method declaration.