Open yyy33 opened 2 months ago
Are you meaning to change type Token = T;
to type Token = &T;
?
If we did then that would first be a breaking change and require waiting until we feel its appropriate to make one.
Also, that signature I gave is incomplete. We'd need that to be type Token<'t> = &'t T
. I've not dealt much with GATs, I'm unsure if we can do type Token<'static> = char
in other cases. &str
streams with a token of char
is an example of where we can't use a reference.
It'd be good to experiment with this to see how feasible it is to do something like this before we get to 0.7
Are you meaning to change
type Token = T;
totype Token = &T;
?
yes
Also started #591 to discuss this and other needs.
Let users decide if they want to clone or not when they use it
where an &T is returned instead of a T: code