Des exemples de code pour programmer en Rust
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- mod m1{
- pub fn a(){
- println ! ("module m1") ;
- }
- pub mod m2 { // module embarqué
- pub fn b(){
- println ! ("module m2") ;
- }
- }
- }
- fn main(){
- m1::a() ;
- m1::m2::b() ; // exécute le module et la fonction embarqués
- }
|