diff options
Diffstat (limited to 'gcc/testsuite/rust/compile/issue-1447.rs')
-rw-r--r-- | gcc/testsuite/rust/compile/issue-1447.rs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/rust/compile/issue-1447.rs b/gcc/testsuite/rust/compile/issue-1447.rs new file mode 100644 index 0000000..e0543e6 --- /dev/null +++ b/gcc/testsuite/rust/compile/issue-1447.rs @@ -0,0 +1,28 @@ +// { dg-options "-w" } +struct PhantomData<T>; + +struct Hasher<S> { + _marker: PhantomData<S>, +} + +struct Sip24Rounds; + +struct SipHasher24 { + hasher: Hasher<Sip24Rounds>, +} + +impl SipHasher24 { + pub fn new_with_keys(key0: u64, key1: u64) -> SipHasher24 { + SipHasher24 { + hasher: Hasher::new_with_keys(), + } + } +} + +impl<S> Hasher<S> { + fn new_with_keys() -> Hasher<S> { + Hasher { + _marker: PhantomData, + } + } +} |