SHARE
TWEET

Untitled

a guest Oct 10th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. mod delicious_snacks {
  2.     use self::fruits::PEAR as fruit;
  3.     use self::veggies::CUCUMBER as veggie;
  4.  
  5.     mod fruits {
  6.         pub const PEAR: &'static str = "Pear";
  7.         pub const APPLE: &'static str = "Apple";
  8.     }
  9.  
  10.     mod veggies {
  11.         pub const CUCUMBER: &'static str = "Cucumber";
  12.         pub const CARROT: &'static str = "Carrot";
  13.     }
  14. }
  15.  
  16. fn main() {
  17.     println!(
  18.         "favorite snacks: {} and {}",
  19.             delicious_snacks::fruit,
  20.             delicious_snacks::veggie
  21.     );
  22. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top