Guest User

Untitled

a guest
May 27th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #[derive(Debug)]
  2. pub struct TestStruct {
  3. pub enumvalue: TestEnum,
  4. }
  5.  
  6. #[derive(Debug)]
  7. pub enum TestEnum {
  8. Val1,
  9. Val2
  10. }
  11.  
  12. pub static mut TEST : TestStruct = TestStruct {
  13. enumvalue: TestEnum::Val1,
  14. };
  15.  
  16. fn main() {
  17. unsafe {
  18. println!("{:?}", TEST.enumvalue);
  19. }
  20. }
Add Comment
Please, Sign In to add comment