mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2025-04-22 05:18:04 +08:00
13 lines
173 B
Rust
Executable File
13 lines
173 B
Rust
Executable File
enum List {
|
|
Cons(i32, List),
|
|
Nil,
|
|
}
|
|
|
|
// ANCHOR: here
|
|
use crate::List::{Cons, Nil};
|
|
|
|
fn main() {
|
|
let list = Cons(1, Cons(2, Cons(3, Nil)));
|
|
}
|
|
// ANCHOR_END: here
|