fn get_cov_path()

in src/llvm_tools.rs [213:226]


fn get_cov_path() -> Result<PathBuf, String> {
    let path = if let Some(mut path) = LLVM_PATH.get().cloned() {
        path.push(format!("llvm-cov{}", EXE_SUFFIX));
        path
    } else {
        llvm_tool_path("cov").map_err(|x| x.to_string())?
    };

    if !path.exists() {
        Err(String::from("We couldn't find llvm-cov. Try installing the llvm-tools component with `rustup component add llvm-tools-preview` or specifying the --llvm-path option."))
    } else {
        Ok(path)
    }
}