logoalt Hacker News

pjmlptoday at 10:35 AM2 repliesview on HN

In general, even though semantic changes haven't yet been a thing in editions so far.

Crate A uses edition X.

Crate B uses edition Y + N, which has broken Rust language semantics between those editions, or changed a standard library type that Crate A uses on its public API in a backwards incompatible way.

Now an application on edition Y + M, with M >= N, would like to depend on Crate A and Crate B, and calling that incompatible API would be a requirement for the implementation goal.

So far editions haven't bothered covering such cases, deemed as not worthwhile thinking about.

Those in such scenarios get to hunt for another crate to replace Crate A, or have a local fork.


Replies

simonasktoday at 4:15 PM

I think it would be useful to give an example of the kind of semantics that would be desirable to change, and where people might think that it should be possible to change at an edition boundary.

I’m not very sure, but maybe something like unforgettable types? Or linear types? Maybe negative trait bounds, or specialization?

tialaramextoday at 12:05 PM

OK, so you don't have any examples, I recommend coming back once you have an example as otherwise there's nothing concrete to engage with here.

show 1 reply