diff options
Diffstat (limited to 'tests/ui/typeck/issue-82772.rs')
-rw-r--r-- | tests/ui/typeck/issue-82772.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/typeck/issue-82772.rs b/tests/ui/typeck/issue-82772.rs new file mode 100644 index 000000000..326273bfe --- /dev/null +++ b/tests/ui/typeck/issue-82772.rs @@ -0,0 +1,13 @@ +// edition:2018 + +fn main() { + use a::ModPrivateStruct; + let Box { 0: _, .. }: Box<()>; //~ ERROR field `0` of + let Box { 1: _, .. }: Box<()>; //~ ERROR field `1` of + let ModPrivateStruct { 1: _, .. } = ModPrivateStruct::default(); //~ ERROR field `1` of +} + +mod a { + #[derive(Default)] + pub struct ModPrivateStruct(u8, u8); +} |