3 ms·
Thank you for the correction. My confusion comes from being able to command-click on standard library types and methods, and being taken to their implementation
by dymk 3y ago
Thank you for the correction. My confusion comes from being able to command-click on standard library types and methods, and being taken to their implementation, not just a declaration. I realize these aren't really concepts in Rust the same way they are in e.g. C/C++, but I figured if the source is present, the compiler is smart enough to not be over-compiling unused symbols.
- steveklabnik 3y agoYeah, it's all good. Rustup will also distribute the source: ~> rustup component list | rg src rust-src (installed) But this is so that that workflow works well, not because the compiler actually uses it during the build. > the compiler is smart enough to not be over-compiling unused symbols. This is true even without the source, mind you, but the devil is just in the details. Stuff like the panic and/or formatting machinery is known to creep in even if you don't think you're using it, because some edge case might. This only truly matters for embedded and similar, but it's still a thing.