daily pastebin goal
42%
SHARE
TWEET

Untitled

a guest May 23rd, 2018 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #[derive(Debug)]
  2. struct A {
  3.     x: usize,
  4.     #[cfg(debug)]
  5.     y: usize,
  6. }
  7.  
  8. fn main() {
  9.     #[cfg(debug)] {
  10.         println!("DEBUG!");
  11.         let a = A {x: 1, y: 2};
  12.     }
  13.     #[cfg(not(debug))]
  14.     let a = A {x: 1};
  15.  
  16.     println!("{:?}", a);
  17. }
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