diff options
Diffstat (limited to 'modules/modules1.rs')
| -rw-r--r-- | modules/modules1.rs | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/modules/modules1.rs b/modules/modules1.rs new file mode 100644 index 0000000..7163495 --- /dev/null +++ b/modules/modules1.rs @@ -0,0 +1,42 @@ +// Make me compile! Scroll down for hints :) + +mod sausage_factory { + fn make_sausage() { + println!("sausage!"); + } +} + +fn main() { + sausage_factory::make_sausage(); +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + +// Everything is private in Rust by default-- but there's a keyword we can use +// to make something public! The compiler error should point to the thing that +// needs to be public. |
