I am trying to define macro that would only expand to anything if certain cfg option is defined, otherwise it should be no-op, but I cannot find a way to do it. Pretty much I want some form of #ifdef.
The closest thing I can find is to enclose generated code in a function, and just do this: #cfg(foo)] def foo(){ //do something } #[cfg(not(foo))] def foo()){} Is there a better way to do that? -- Maciej Dziardziel fied...@gmail.com _______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev