Closed
Description
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
- all of the members are public
- at least one of the struct members has an attribute (like
#[serde(rename = "some_name")]
)
Example code that is broken:
In the same module the code works:
Same with normal structs:
The broken code works in 1.38.0:
Meta
One of the affected installations:
rustc 1.41.0-nightly (5c5b8afd8 2019-11-16)
binary: rustc
commit-hash: 5c5b8afd80e6fa1d24632153cb2257c686041d41
commit-date: 2019-11-16
host: x86_64-apple-darwin
release: 1.41.0-nightly
LLVM version: 9.0