Skip to content

Commit f36a93e

Browse files
committed
Inline toolchain_info module
1 parent d105253 commit f36a93e

File tree

3 files changed

+19
-17
lines changed

3 files changed

+19
-17
lines changed

src/tools/rust-analyzer/crates/project-model/src/lib.rs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,24 @@
1616
//! * Lowering of concrete model to a [`base_db::CrateGraph`]
1717
1818
pub mod project_json;
19-
pub mod toolchain_info;
19+
pub mod toolchain_info {
20+
pub mod rustc_cfg;
21+
pub mod target_data_layout;
22+
pub mod target_triple;
23+
24+
use std::path::Path;
25+
26+
use crate::{ManifestPath, Sysroot};
27+
28+
#[derive(Copy, Clone)]
29+
pub enum QueryConfig<'a> {
30+
/// Directly invoke `rustc` to query the desired information.
31+
Rustc(&'a Sysroot, &'a Path),
32+
/// Attempt to use cargo to query the desired information, honoring cargo configurations.
33+
/// If this fails, falls back to invoking `rustc` directly.
34+
Cargo(&'a Sysroot, &'a ManifestPath),
35+
}
36+
}
2037

2138
mod build_dependencies;
2239
mod cargo_workspace;

src/tools/rust-analyzer/crates/project-model/src/toolchain_info.rs

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/tools/rust-analyzer/crates/project-model/src/toolchain_info/target_triple.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//! Functionality to discover the current build target(s).
12
use std::path::Path;
23

34
use anyhow::Context;

0 commit comments

Comments
 (0)