4 ms·
> And if you're not, then the files would be excluded from the build anyway. They aren't though. Even if the module isn't `use`d, it's still compiled. (And it
by justinpombrio 6y ago
> And if you're not, then the files would be excluded from the build anyway.
They aren't though. Even if the module isn't `use`d, it's still compiled.
(And it has to be. If nothing else, there could be a trait impl buried in the module, which gets shared without `use`.)
- nicoburns 6y agoIt doesn't have to be. It could default to be compiled if used and not being compiled unless use'd. And in the rare case that a trait impl or similar in a module without importing from that module, then you could use `mod`.