rust/tests/crashes/121538.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
429 B
Rust
Raw Normal View History

2024-04-15 16:01:02 -05:00
//@ 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>);
}