3 // [thir]compile-flags: -Z thir-unsafeck
5 // This is issue #85435. But the real story is reflected in issue #85561, where
6 // a bug in the implementation of feature(capture_disjoint_fields) () was
7 // exposed to non-feature-gated code by a diagnostic changing PR that removed
8 // the gating in one case.
10 // This test is double-checking that the case of interest continues to work as
11 // expected in the *absence* of that feature gate. At the time of this writing,
12 // enabling the feature gate will cause this test to fail. We obviously cannot
13 // stabilize that feature until it can correctly handle this test.
17 let u8_ptr: *const u8 = &val;
23 // Just dereferencing and returning directly compiles fine: