diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/auxiliary/issue-31702-1.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/issues/auxiliary/issue-31702-1.rs b/src/test/ui/issues/auxiliary/issue-31702-1.rs new file mode 100644 index 000000000..a48d0dc2c --- /dev/null +++ b/src/test/ui/issues/auxiliary/issue-31702-1.rs @@ -0,0 +1,16 @@ +#[derive(Copy)] +pub struct U256(pub [u64; 4]); + +impl Clone for U256 { + fn clone(&self) -> U256 { + *self + } +} + +impl U256 { + pub fn new(value: u64) -> U256 { + let mut ret = [0; 4]; + ret[0] = value; + U256(ret) + } +} |