Skip to content

Glossary: Coding Interviews in Rust

#[cfg(test)]

Also written: cfg(test), use super::*

An attribute meaning "compile this only when testing". It is placed on a test module, where `use super::*;` brings in the functions defined above it.

Where the book teaches it

Related terms

#[test]Cargo