Nothing has changed, but cargo-breaking detects a modification of function f.
This is caused by the fact that we compile the two versions as a dependency of a third one. As such, these two S declaration are handled as two different types, hence interpreted as a modification.
A simple workaround would be to create a bew method to the TyCtxt (perhaps by adding a trait), allowing it to better compare two types, we would call this method instead of checking for changes using ty_a == ty_b.
Let's consider the following code:
Nothing has changed, but
cargo-breaking
detects a modification of functionf
.This is caused by the fact that we compile the two versions as a dependency of a third one. As such, these two
S
declaration are handled as two different types, hence interpreted as a modification.A simple workaround would be to create a bew method to the
TyCtxt
(perhaps by adding a trait), allowing it to better compare two types, we would call this method instead of checking for changes usingty_a == ty_b
.