mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-25 19:35:06 +00:00
Inline toolchain_info module
This commit is contained in:
parent
f5fb2b9e9f
commit
98fde69dcf
3 changed files with 19 additions and 17 deletions
|
@ -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;
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
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),
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
//! Functionality to discover the current build target(s).
|
||||
use std::path::Path;
|
||||
|
||||
use anyhow::Context;
|
||||
|
|
Loading…
Reference in a new issue