diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-58212.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-58212.rs b/src/test/ui/issues/issue-58212.rs new file mode 100644 index 000000000..4695497c3 --- /dev/null +++ b/src/test/ui/issues/issue-58212.rs @@ -0,0 +1,15 @@ +// check-pass + +trait FromUnchecked { + fn from_unchecked(); +} + +impl FromUnchecked for [u8; 1] { + fn from_unchecked() { + let mut array: Self = [0; 1]; + let _ptr = &mut array as *mut [u8] as *mut u8; + } +} + +fn main() { +} |