hi all, I'm using manual(https://doc.rust-lang.org/book) for studying rust but I'm stuck on https://doc.rust-lang.org/book/crates-and-modules.html#exporting-a-public-interface. It doesnt compile with message:
Compiling phrases v0.1.0 (file:///D:/rust/phrases)
src\main.rs:7:38: 7:54 error: unresolved name `greetings::hello` [E0425]
src\main.rs:7 println!("Hello in English: {}", greetings::hello());
^~~~~~~~~~~~~~~~
<std macros>:2:27: 2:58 note: in this expansion of format_args!
<std macros>:3:1: 3:54 note: in this expansion of print! (defined in <std macros>)
src\main.rs:7:5: 7:58 note: in this expansion of println! (defined in <std macros>)
src\main.rs:7:38: 7:54 help: run `rustc --explain E0425` to see a detailed explanation
src\main.rs:8:40: 8:58 error: unresolved name `farewells::goodbye` [E0425]
src\main.rs:8 println!("Goodbye in English: {}", farewells::goodbye());
^~~~~~~~~~~~~~~~~~
<std macros>:2:27: 2:58 note: in this expansion of format_args!
<std macros>:3:1: 3:54 note: in this expansion of print! (defined in <std macros>)
src\main.rs:8:5: 8:62 note: in this expansion of println! (defined in <std macros>)
src\main.rs:8:40: 8:58 help: run `rustc --explain E0425` to see a detailed explanation
error: aborting due to 2 previous errors
error: Could not compile `phrases`.
is it an error in manual or I'm doing something wrong?
mod greetings;
mod farewells;
trait X: Sized {...}
. and make trait-objects &X
TreeNode
contains other TreeNode
s. Which can have different type