By default, rustup does not install the source code for the Rust standard library. But to install it, you can run the following command:
$ rustup component add rust-src
The source is set to ~/.rustup/toolchains/$TOOLCHAIN/lib/rustlib/src/rust/src/ (where $TOOLCHAIN is the name of the tool chain you are using).
source share