Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
runevault
on July 13, 2022
|
parent
|
context
|
favorite
| on:
Six programming languages I’d like to see
You can do this in Rust. Just put a namespace tagged as I think #[cfg(test)] or the like and they can live in the same file but won't be compiled into the non-test binary.
masklinn
on July 13, 2022
[–]
Technically you don't even have to `cfg`-gate it, it's just good practice to avoid e.g. unused code warnings in the test module.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: