about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/crashes/ice-10508b.rs
blob: 7588419381cfe77d17cc13cb8933d08b8e02e240 (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
//@ check-pass

use std::marker::PhantomData;

struct Digit<T> {
    elem: T,
}

struct Node<T: 'static> {
    m: PhantomData<&'static T>,
}

enum FingerTree<T: 'static> {
    Single(T),

    Deep(Digit<T>, Node<FingerTree<Node<T>>>),
}

enum Wrapper<T: 'static> {
    Simple,
    Other(FingerTree<T>),
}

fn main() {
    let w = Some(Wrapper::Simple::<u32>);
}