fix: make hello public
This commit is contained in:
parent
ced7cc5c65
commit
9da1dd74c0
@ -50,7 +50,7 @@ fn main() {
|
||||
And a `foo.rs` that had this:
|
||||
|
||||
```rust,ignore
|
||||
fn hello() {
|
||||
pub fn hello() {
|
||||
println!("Hello, world!");
|
||||
}
|
||||
```
|
||||
@ -65,4 +65,4 @@ No need to tell `rustc` about `foo.rs`; the `mod` statements give it
|
||||
everything that it needs. This is different than how you would use a C
|
||||
compiler, where you invoke the compiler on each file, and then link
|
||||
everything together. In other words, the *crate* is a translation unit, not a
|
||||
particular module.
|
||||
particular module.
|
||||
|
Loading…
Reference in New Issue
Block a user