Open
Description
Function request: adding Size Bound by default to generic virtual text
Why are we doing this?
In Rust we specified that the Size Trait bound constraint is implemented for all generic T's, so we should also display it on our own virtual text type prompt instead of popping a T and jumping the Size Trait.
Suppose we have the following generic signature:
impl<T> SomethingOrNothing<T> {}
At this stage
when the mouse moves over the generics, it looks like this:
T |
---|
Go to Size |
I would like to be able to add a trait bound of T: SIze to the virtual text, as shown below:
T: Size |
---|
Go to Size |
Similarly, when we hold down Ctrl to move to generic T, it looks like this:
T |
---|
Go to Size |
T |
After the change, as shown below:
T: Size |
---|
Go to Size |
T: Size |
More examples
impl<T: Clone> SomethingOrNothing<T> {}
Display of virtual text
T: Clone |
---|
Go to Clone | Size |
After the change ===>
T: Clone + Size |
---|
Go to Clone | Size |