1 Something other than a struct, variant or union has been used when one was
4 Erroneous code example:
9 let sauron = Mordor { x: () }; // error!
15 let eco = Jak::Daxter { i: 1 };
17 Jak { i } => {} // error!
21 In all these errors, a type was expected. For example, in the first error,
22 we tried to instantiate the `Mordor` module, which is impossible. If you want
23 to instantiate a type inside a module, you can do it as follow:
32 let sauron = Mordor::TheRing { x: 1 }; // ok!
35 In the second error, we tried to bind the `Jak` enum directly, which is not
36 possible: you can only bind one of its variants. To do so:
43 let eco = Jak::Daxter { i: 1 };
45 Jak::Daxter { i } => {} // ok!