15章中有关 cons list的代码无法编译
@ -71,7 +71,7 @@ enum List {
<span class="filename">文件名: src/main.rs</span>
```rust,ignore
use List::{Cons, Nil};
use crate::List::{Cons, Nil};
fn main() {
let list = Cons(1, Cons(2, Cons(3, Nil)));
@ -145,7 +145,7 @@ enum List {
Nil,
}
let list = Cons(1,
@ -34,7 +34,7 @@ enum List {
let a = Cons(5,
@ -76,7 +76,7 @@ enum List {
use std::rc::Rc;
@ -106,7 +106,7 @@ fn main() {
# Nil,
# }
#
# use List::{Cons, Nil};
# use crate::List::{Cons, Nil};
# use std::rc::Rc;
@ -272,7 +272,7 @@ enum List {
use std::cell::RefCell;
@ -19,7 +19,7 @@ doc tests do; the `use List` fails if this listing is put within a main -->
# fn main() {}
#[derive(Debug)]
enum List {
@ -46,7 +46,7 @@ impl List {
<span class="filename">Filename: src/main.rs</span>
```rust
# use std::cell::RefCell;
# #[derive(Debug)]