diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-38412.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-38412.rs b/src/test/ui/issues/issue-38412.rs new file mode 100644 index 000000000..96bd93af5 --- /dev/null +++ b/src/test/ui/issues/issue-38412.rs @@ -0,0 +1,10 @@ +fn main() { + let Box(a) = loop { }; + //~^ ERROR cannot match against a tuple struct which contains private fields + + // (The below is a trick to allow compiler to infer a type for + // variable `a` without attempting to ascribe a type to the + // pattern or otherwise attempting to name the Box type, which + // would run afoul of issue #22207) + let _b: *mut i32 = *a; +} |