When used in argument position, impl Trait is equivalent to a type param, with the main difference being the inability to manually specify the type using turbofish.
Is it then a semver-compatible change to go from impl Trait to an actual type parameter?
In general, I think the page in the cargo book that talks about semver compatibility could use a lot more details.
Might be that this is not part of Cargo's semver guide, because APITs not being specifiable via turbofish is considered a restriction that is supposed to be amended in the future. In the mean time, I'd go with the reference:
Changing a parameter from either one to the other can constitute a breaking change for the callers of a function, since this changes the number of generic arguments.
and consider it a breaking change to go from an APIT to a generic parameter.
The amendment so far is to allow turbofishing without a way to specify the APITs.[1] I think technically some non-turbofish door is still open, but perhaps not practically. The FCP went with option 2 listed here.
That document is out of date enough that it claims you can't mix the two. âŠī¸