mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
31 lines
429 B
Rust
31 lines
429 B
Rust
|
//@ known-bug: #121538
|
||
|
//@ compile-flags: -Cdebuginfo=2
|
||
|
|
||
|
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>);
|
||
|
|
||
|
}
|