From 9da1dd74c05792ab8850b954752f2afc3a8a5319 Mon Sep 17 00:00:00 2001 From: Satya Rohith Date: Thu, 13 Dec 2018 15:07:10 +0530 Subject: [PATCH] fix: make hello public --- src/doc/rustc/src/what-is-rustc.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doc/rustc/src/what-is-rustc.md b/src/doc/rustc/src/what-is-rustc.md index bed1b71c24e..9dcc9f7daa9 100644 --- a/src/doc/rustc/src/what-is-rustc.md +++ b/src/doc/rustc/src/what-is-rustc.md @@ -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. \ No newline at end of file +particular module.