Defining RUSTUP_HOME and/or CARGO_HOME environment variables to override default installation directory for .cargo and .rustup does not work (in Windows at least).
Steps to reproduce:
Define RUSTUP_HOME as an environment variable
Define CARGO_HOME as an environment variable
Double click on rustup-init.exe to begin the installation
Result:
.rustup and .cargo will be installed at the default directory which is %USERPROFILE%.