]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-38412.rs
Rollup merge of #104059 - Rejyr:rustc_middle-lint-typo, r=petrochenkov
[rust.git] / src / test / ui / issues / issue-38412.rs
1 fn main() {
2     let Box(a) = loop { };
3     //~^ ERROR cannot match against a tuple struct which contains private fields
4
5     // (The below is a trick to allow compiler to infer a type for
6     // variable `a` without attempting to ascribe a type to the
7     // pattern or otherwise attempting to name the Box type, which
8     // would run afoul of issue #22207)
9     let _b: *mut i32 = *a;
10 }