False positive when replacing a struct with a pub type
alias
#609
Labels
C-bug
Category: doesn't meet expectations
pub type
alias
#609
Steps to reproduce the bug with the above code
We've found that we can't move things around in a backwards compatible way using
pub use
since thedeprecated
attribute doesn't work on use statements, so we've been usingpub type
to move them around instead. When we do this,cargo-semver-checks
reports it as a breaking change:To reproduce, have crates A and B, with B depending on A. Leave A empty for now. In B, add a struct:
Then, as part of a patch release for both crates, move
Foo
into A, and re-export it using apub type
in B.A:
B:
There's a real-world repro in smithy-lang/smithy-rs#3318
Actual Behaviour
False positive saying the struct was removed and can't be referenced anymore.
Expected Behaviour
It should recognize that the type alias has the same name and points to the struct. (Actually not sure rustdoc has enough information to make this possible.)
Generated System Information
Software version
cargo-semver-checks 0.26.0
Operating system
macOS 13.6.2 (Darwin 22.6.0)
Command-line
cargo version
Compile time information
Build Configuration
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: