rustc/tests/ui/structs-enums/enum-rec/issue-17431-6.rs
2025-01-11 15:57:26 +01:00

10 lines
188 B
Rust

use std::cell::UnsafeCell;
enum Foo { X(UnsafeCell<Option<Foo>>) }
//~^ ERROR recursive type `Foo` has infinite size
//~| ERROR cycle detected
impl Foo { fn bar(self) {} }
fn main() {}