errorversion/examples/coinductive.rs
2026-05-16 20:31:48 +02:00

13 lines
194 B
Rust

#![allow(unused)]
enum List<T> {
Nil,
Cons(T, Box<List<T>>),
}
fn is_send(x: impl Send) {}
fn main() {
let x = 3;
is_send(List::Cons(&mut x as *mut _, Box::new(List::Nil)))
}