Therefore, changing the environment variables RUST_SRC_PATH and CARGO_HOME or variables racer-rust-src-path, racer-cargo-home does not really change anything
That said, it looks like process-environment is not a buffer-local value, so I don't see why changing to a temporary buffer would have changed its value.
process-environment values (rust-src-path and cargo-home) (https://github.com/racer-rust/emacs-racer/blob/master/racer.el#L202) not available in temporary buffer: (https://github.com/racer-rust/emacs-racer/blob/master/racer.el#L237)
Therefore, changing the environment variables RUST_SRC_PATH and CARGO_HOME or variables racer-rust-src-path, racer-cargo-home does not really change anything