aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/issue-1447.rs
blob: 6d58f7a6eea3f904da7bfae8390ad1405c2ab62c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// { dg-options "-w" }
#[lang = "sized"]
pub trait Sized {}

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,
        }
    }
}