I know I can just apply Display to T in the function head in this example, but in my use-case this would mean I would have to apply this bound to a lot of parent structures. Also I basically just want this for debugging.
Yeah, it's true, I've only made the bound indirect. I was going to mention though, it's not a bad idea to get in the habit of using #[derive(Debug)] on your structs and using that instead anyway.
I thought about that too but I don't think this helps me here, because the output of Debug is not the same as for Display.. and I want to specifically output the Display version in this case..
the case is basically that I have a struct Index<T> and a struct Reference<T>, and i have a function