Skip to content

Commit

Permalink
Inline toolchain_info module
Browse files Browse the repository at this point in the history
  • Loading branch information
Veykril committed Dec 29, 2024
1 parent d105253 commit f36a93e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
19 changes: 18 additions & 1 deletion src/tools/rust-analyzer/crates/project-model/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,24 @@
//! * Lowering of concrete model to a [`base_db::CrateGraph`]
pub mod project_json;
pub mod toolchain_info;
pub mod toolchain_info {
pub mod rustc_cfg;
pub mod target_data_layout;
pub mod target_triple;

use std::path::Path;

use crate::{ManifestPath, Sysroot};

#[derive(Copy, Clone)]
pub enum QueryConfig<'a> {
/// Directly invoke `rustc` to query the desired information.
Rustc(&'a Sysroot, &'a Path),
/// Attempt to use cargo to query the desired information, honoring cargo configurations.
/// If this fails, falls back to invoking `rustc` directly.
Cargo(&'a Sysroot, &'a ManifestPath),
}
}

mod build_dependencies;
mod cargo_workspace;
Expand Down
16 changes: 0 additions & 16 deletions src/tools/rust-analyzer/crates/project-model/src/toolchain_info.rs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! Functionality to discover the current build target(s).
use std::path::Path;

use anyhow::Context;
Expand Down

0 comments on commit f36a93e

Please sign in to comment.