first commit
This commit is contained in:
commit
4cd2267497
10 changed files with 644 additions and 0 deletions
13
examples/coinductive.rs
Normal file
13
examples/coinductive.rs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#![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)))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue