-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cross-crate enum struct variants exporting bug #8746
Labels
A-metadata
Area: Crate metadata
Comments
Forgot to add the version, it's fairly recent:
|
There is an existing issue describing a similar bug. #5557 Sorry for not searching before actually submitting, but maybe it's worth bringing the attention to it, as it's not marked with A-metadata tag. |
bors
added a commit
that referenced
this issue
Sep 11, 2013
Fixes issues #5557 and #8746. This patch adds an additional family for struct-like variants, and encodes some struct-like aspects of such variants that can then be properly decoded by resolve. Note that I am not 100% sure how this fix works, but it fixes the issue without breaking any of the tests on my machine.
Closed by #9064 |
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
Jun 30, 2022
try reading rust-version from Cargo.toml Cargo.toml can contain a field `rust-version`, that acts like a MSRV of clippy.toml file: https://doc.rust-lang.org/cargo/reference/manifest.html#the-rust-version-field This will try to read that field and use it, if the clippy.toml config has no `msrv` entry changelog: respect `rust-version` from `Cargo.toml` closes rust-lang#8746 closes rust-lang#7765
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The bug occurs only in a cross-crate scenario, probably related to metadata encoding/decoding, have no idea. Here's a quick way to make a mockup:
test.rs:
.rust/src/testenum/lib.rs
Then build the crate:
rustpkg install testenum
. And compile the test.rs:rustc -o test test.rs
. It compiles just fine, when it actually shouldn't. Because testenum::B is a struct variant, not a tuple. Uncommenting the struct variant and commenting out the tuple variant results in a compilation error:The text was updated successfully, but these errors were encountered: