1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2025-06-15 00:04:58 +02:00

feat(modules): update exercises, add modules3 (#822)

Co-authored-by: diannasoriel <mokou@fastmail.com>
This commit is contained in:
anuk909
2021-09-03 11:41:12 +03:00
committed by GitHub
parent 96fc301764
commit dfd2fab4f3
6 changed files with 45 additions and 9 deletions

View File

@ -1,11 +1,15 @@
// modules2.rs
// You can bring module paths into scopes and provide new names for them with the
// 'use' and 'as' keywords. Fix these 'use' statments to make the code compile.
// Make me compile! Execute `rustlings hint modules2` for hints :)
// I AM NOT DONE
mod delicious_snacks {
use self::fruits::PEAR as fruit;
use self::veggies::CUCUMBER as veggie;
// TODO: Fix these use statments
use self::fruits::PEAR as ???
use self::veggies::CUCUMBER as ???
mod fruits {
pub const PEAR: &'static str = "Pear";