tuple structs with all-public fields can not be instantiated if one of the fields has an external attribute #66555
Labels
A-attributes
Area: Attributes (`#[…]`, `#![…]`)
A-visibility
Area: Visibility / privacy
C-bug
Category: This is a bug.
P-high
High priority
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
In current nightly (2019-11-18 and also 2019-11-16) and stable (1.39.0), tuple structs can not be instantiated from an outside module directly if
#[serde(rename = "some_name")]
)Example code that is broken:
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=7108f99f96b03247b7d44bdf47091a1a
In the same module the code works:
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=a896f6f28a050228c4e91d9e3bcc5557
Same with normal structs:
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=2083f2cae68b7378652bd239bb122d20
The broken code works in 1.38.0:
https://godbolt.org/z/_8KX6P
Meta
One of the affected installations:
The text was updated successfully, but these errors were encountered: