mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
18 lines
324 B
Rust
18 lines
324 B
Rust
//@ known-bug: #115994
|
|
//@ compile-flags: -Cdebuginfo=2 --crate-type lib
|
|
|
|
// To prevent "overflow while adding drop-check rules".
|
|
use std::mem::ManuallyDrop;
|
|
|
|
pub enum Foo<U> {
|
|
Leaf(U),
|
|
|
|
Branch(BoxedFoo<BoxedFoo<U>>),
|
|
}
|
|
|
|
pub type BoxedFoo<U> = ManuallyDrop<Box<Foo<U>>>;
|
|
|
|
pub fn test() -> Foo<usize> {
|
|
todo!()
|
|
}
|