diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-47073-zero-padded-tuple-struct-indices.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-47073-zero-padded-tuple-struct-indices.rs b/src/test/ui/issues/issue-47073-zero-padded-tuple-struct-indices.rs new file mode 100644 index 000000000..6cd1f1443 --- /dev/null +++ b/src/test/ui/issues/issue-47073-zero-padded-tuple-struct-indices.rs @@ -0,0 +1,12 @@ +type Guilty = bool; +type FineDollars = u32; + +struct Verdict(Guilty, Option<FineDollars>); + +fn main() { + let justice = Verdict(true, Some(2718)); + let _condemned = justice.00; + //~^ ERROR no field `00` on type `Verdict` + let _punishment = justice.001; + //~^ ERROR no field `001` on type `Verdict` +} |