mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Support disabling rustc build scripts
This commit is contained in:
parent
877f745551
commit
ddce6bb282
10 changed files with 61 additions and 12 deletions
|
@ -56,6 +56,7 @@ impl fmt::Debug for ProjectWorkspace {
|
|||
match self {
|
||||
ProjectWorkspace::Cargo { cargo, sysroot, rustc, rustc_cfg } => f
|
||||
.debug_struct("Cargo")
|
||||
.field("root", &cargo.workspace_root())
|
||||
.field("n_packages", &cargo.packages().len())
|
||||
.field("n_sysroot_crates", &sysroot.crates().len())
|
||||
.field(
|
||||
|
@ -273,12 +274,19 @@ impl ProjectWorkspace {
|
|||
crate_graph
|
||||
}
|
||||
|
||||
pub fn collect_build_data_configs(&self, collector: &mut BuildDataCollector) {
|
||||
pub fn collect_build_data_configs(
|
||||
&self,
|
||||
collector: &mut BuildDataCollector,
|
||||
for_private: bool,
|
||||
) {
|
||||
match self {
|
||||
ProjectWorkspace::Cargo { cargo, rustc, .. } => {
|
||||
collector.add_config(&cargo.workspace_root(), cargo.build_data_config().clone());
|
||||
if let Some(rustc) = rustc {
|
||||
collector.add_config(rustc.workspace_root(), rustc.build_data_config().clone());
|
||||
if for_private {
|
||||
if let Some(rustc) = rustc {
|
||||
collector
|
||||
.add_config(rustc.workspace_root(), rustc.build_data_config().clone());
|
||||
}
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue