Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. pub mod parent {
  2. pub mod child1 {
  3. pub struct Struct1 {}
  4. }
  5. pub mod child2 {
  6. pub struct Struct2 {}
  7. }
  8. pub enum MyEnum {
  9. Struct1(child1::Struct1),
  10. Struct2(child2::Struct2),
  11. }
  12. }
  13.  
  14. pub fn main() {
  15. let _foo = parent::MyEnum::Struct1(parent::child1::Struct1 {});
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement