|
1 | 1 | $ cargo run
|
2 | 2 | Compiling cons-list v0.1.0 (file:///projects/cons-list)
|
3 | 3 | error[E0072]: recursive type `List` has infinite size
|
| 4 | +(エラー: 再帰的な型`List`は無限のサイズを持ちます) |
4 | 5 | --> src/main.rs:1:1
|
5 | 6 | |
|
6 | 7 | 1 | enum List {
|
7 |
| - | ^^^^^^^^^ recursive type has infinite size |
| 8 | + | ^^^^^^^^^ |
8 | 9 | 2 | Cons(i32, List),
|
9 | 10 | | ---- recursive without indirection
|
10 | 11 | |
|
11 |
| - = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `List` representable |
12 |
| - |
13 |
| -error[E0391]: cycle detected when processing `List` |
14 |
| - --> src/main.rs:1:1 |
15 |
| - | |
16 |
| -1 | enum List { |
17 |
| - | ^^^^^^^^^ |
| 12 | +help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle |
| 13 | +(ヘルプ: 何らかの間接参照(例: `Box`、`Rc`、あるいは`&`)を挿入して、循環参照を断ち切ってください) |
18 | 14 | |
|
19 |
| - = note: ...which again requires processing `List`, completing the cycle |
20 |
| - = note: cycle used when computing dropck types for `Canonical { max_universe: U0, variables: [], value: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, def_id: None }, value: List } }` |
21 |
| - |
22 |
| -error: aborting due to 2 previous errors |
23 |
| - |
24 |
| -Some errors have detailed explanations: E0072, E0391. |
25 |
| -For more information about an error, try `rustc --explain E0072`. |
26 |
| -error: could not compile `cons-list`. |
| 15 | +2 | Cons(i32, Box<List>), |
| 16 | + | ++++ + |
27 | 17 |
|
28 |
| -To learn more, run the command again with --verbose. |
| 18 | +For more information about this error, try `rustc --explain E0072`. |
| 19 | +error: could not compile `cons-list` (bin "cons-list") due to 1 previous error |
0 commit comments