3 ms·
> But it not always easy to toggle such comments on and off Try: /*-* / non_pub_locally_unused_item(----) { ---- } //-*/ remove the space on the first
by a1369209993 7y ago
> But it not always easy to toggle such comments on and off
Try:
/*-* /
non_pub_locally_unused_item(----) { ---- }
//-*/
remove the space on the first line to re-enable it.
- klyrs 7y agoFor A/B testing, I use this in C++; it looks like it works in rust (according to my syntax highlighter): //* //add/delete the first slash to toggle these blocks fooA(); /*/ fooB(); /**/
- FartyMcFarter 7y agoI like this for C/C++: #if 1 // or 0 A #else B #endif This can even be nested.
- ncmncm 7y agoThis is so overwhelmingly better in every conceivable way that there is no excuse for ever using the other thing. (Unless you are using Rust and don't have it?)
- klyrs 7y agoYeah, that's good too. When I don't need nesting, I like toggleable comments because the inactive block gets grayed out.
- FartyMcFarter 7y agoSome editors like vim also grey out the text with "#if".