Repository: intellij-rust/intellij-rust
Issue: Evcxr executable not found

## Environment

* **IntelliJ Rust plugin version:**  0.2.121.3059-201-stable
* **Rust toolchain version:**  Tested with:
  * (stable) 1.43.0 (4fb7144ed 2020-04-20)
  * 1.44.0-nightly (b2e36e6c2 2020-04-22)
* **IDE name and version:**  CLion 2020.1.1  Build #CL-201.7223.86
* **Operating system:**  Arch Linux (kernel: 5.6.7-arch1-1-vfio)

## Problem description  
The Rust REPL won't start.  Attempting to start it for the first time does successfully run `cargo install evcxr_repl`, but then when attempting to open it I get:
```
Error: Can't start evcxr
    Evcxr executable not found
```  
Re-running with the green restart arrow next to the error window presents a similar error:
```
Error: Can't start evcxr.
    java.lang.RuntimeException: Evcxr executable not found
```
However (in and out of CLion's terminal):
```sh
delamare@Ashalanoray ~ % which evcxr     
/home/delamare/.cargo/bin/evcxr
delamare@Ashalanoray ~ % echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/cuda/bin:/usr/lib/emscripten:/home/delamare/.local/share/flatpak/exports/bin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/delamare/.cargo/bin
````  
I have attempted uninstalling and reinstalling with both nightly and stable and also install in or out of CLion each time also restarting CLion.

Not sure what to try next...
## Steps to reproduce  
Tools -> Rust REPL


Changed files:
src/main/kotlin/org/rust/cargo/toolchain/RustToolchain.kt

diff --git a/src/main/kotlin/org/rust/cargo/toolchain/RustToolchain.kt b/src/main/kotlin/org/rust/cargo/toolchain/RustToolchain.kt
index ad0fd59e5..4b803bdbb 100644
--- a/src/main/kotlin/org/rust/cargo/toolchain/RustToolchain.kt
+++ b/src/main/kotlin/org/rust/cargo/toolchain/RustToolchain.kt
@@ -11,6 +11,7 @@ import com.intellij.openapi.util.io.FileUtil
 import com.intellij.openapi.vfs.LocalFileSystem
 import com.intellij.openapi.vfs.VirtualFile
 import com.intellij.openapiext.isUnitTestMode
+import com.intellij.util.io.exists
 import com.intellij.util.text.SemVer
 import org.rust.openapiext.*
 import java.io.File
@@ -76,22 +77,39 @@ data class RustToolchain(val location: Path) {
 
     fun rustfmt(): Rustfmt = Rustfmt(pathToExecutable(RUSTFMT))
 
-    fun grcov(): Grcov? = if (hasExecutable(GRCOV)) Grcov(pathToExecutable(GRCOV)) else null
+    fun grcov(): Grcov? = if (hasCargoExecutable(GRCOV)) Grcov(pathToCargoExecutable(GRCOV)) else null
 
-    fun evcxr(): Evcxr? = if (hasExecutable(EVCXR)) Evcxr(pathToExecutable(EVCXR)) else null
+    fun evcxr(): Evcxr? = if (hasCargoExecutable(EVCXR)) Evcxr(pathToCargoExecutable(EVCXR)) else null
 
     val isRustupAvailable: Boolean get() = hasExecutable(RUSTUP)
 
     val presentableLocation: String = pathToExecutable(CARGO).toString()
 
+    // for executables from toolchain
     private fun pathToExecutable(toolName: String): Path {
         val exeName = if (SystemInfo.isWindows) "$toolName.exe" else toolName
         return location.resolve(exeName).toAbsolutePath()
     }
 
+    // for executables installed using `cargo install`
+    private fun pathToCargoExecutable(toolName: String): Path {
+        // Binaries installed by `cargo install` (e.g. Grcov, Evcxr) are placed in ~/.cargo/bin by default:
+        // https://doc.rust-lang.org/cargo/commands/cargo-install.html
+        // But toolchain root may be different (e.g. on Arch Linux it is usually /usr/bin)
+        val path = pathToExecutable(toolName)
+        if (path.exists()) return path
+
+        val exeName = if (SystemInfo.isWindows) "$toolName.exe" else toolName
+        val cargoBinPath = File(FileUtil.expandUserHome("~/.cargo/bin")).toPath()
+        return cargoBinPath.resolve(exeName).toAbsolutePath()
+    }
+
     private fun hasExecutable(exec: String): Boolean =
         Files.isExecutable(pathToExecutable(exec))
 
+    private fun hasCargoExecutable(exec: String): Boolean =
+        Files.isExecutable(pathToCargoExecutable(exec))
+
     data class VersionInfo(
         val rustc: RustcVersion?
     )