MCPcopy Create free account
hub / github.com/CodeSentryAI/lockbud / find_sysroot

Function find_sysroot

src/main.rs:94–107  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

92}
93
94fn find_sysroot() -> String {
95 let home = option_env!("RUSTUP_HOME");
96 let toolchain = option_env!("RUSTUP_TOOLCHAIN");
97 #[allow(clippy::option_env_unwrap)]
98 match (home, toolchain) {
99 (Some(home), Some(toolchain)) => format!("{}/toolchains/{}", home, toolchain),
100 _ => option_env!("RUST_SYSROOT")
101 .expect(
102 "Could not find sysroot. Specify the RUST_SYSROOT environment variable, \
103 or use rustup to set the compiler to use for LOCKBUD",
104 )
105 .to_owned(),
106 }
107}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected