Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #[derive(Debug)]
- struct A {
- x: usize,
- #[cfg(debug)]
- y: usize,
- }
- fn main() {
- #[cfg(debug)] {
- println!("DEBUG!");
- let a = A {x: 1, y: 2};
- }
- #[cfg(not(debug))]
- let a = A {x: 1};
- println!("{:?}", a);
- }
Add Comment
Please, Sign In to add comment