Auto merge of #146927 - Kobzol:install-clif, r=jieyouxu
Make it possible to `x install` Cranelift and LLVM bitcode linker
It was not possible to install these before, as they were not in the install step description list.
Fixes: https://github.com/rust-lang/rust/issues/140331
r? `@jieyouxu`
diff --git a/crates/hir-def/src/lib.rs b/crates/hir-def/src/lib.rs
index 301d4cc..e5c213c 100644
--- a/crates/hir-def/src/lib.rs
+++ b/crates/hir-def/src/lib.rs
@@ -15,10 +15,6 @@
#[cfg(not(feature = "in-rust-tree"))]
extern crate ra_ap_rustc_parse_format as rustc_parse_format;
-#[cfg(feature = "in-rust-tree")]
-extern crate rustc_abi;
-
-#[cfg(not(feature = "in-rust-tree"))]
extern crate ra_ap_rustc_abi as rustc_abi;
pub mod db;
diff --git a/crates/hir-expand/src/builtin/derive_macro.rs b/crates/hir-expand/src/builtin/derive_macro.rs
index 15e68ff..0fa412a 100644
--- a/crates/hir-expand/src/builtin/derive_macro.rs
+++ b/crates/hir-expand/src/builtin/derive_macro.rs
@@ -12,7 +12,7 @@
use crate::{
ExpandError, ExpandResult, MacroCallId,
- builtin::quote::{dollar_crate, quote},
+ builtin::quote::dollar_crate,
db::ExpandDatabase,
hygiene::span_with_def_site_ctxt,
name::{self, AsName, Name},
diff --git a/crates/hir-expand/src/builtin/fn_macro.rs b/crates/hir-expand/src/builtin/fn_macro.rs
index ec34461..6fe63f2 100644
--- a/crates/hir-expand/src/builtin/fn_macro.rs
+++ b/crates/hir-expand/src/builtin/fn_macro.rs
@@ -19,7 +19,7 @@
use crate::{
EditionedFileId, ExpandError, ExpandResult, Lookup as _, MacroCallId,
- builtin::quote::{WithDelimiter, dollar_crate, quote},
+ builtin::quote::{WithDelimiter, dollar_crate},
db::ExpandDatabase,
hygiene::{span_with_call_site_ctxt, span_with_def_site_ctxt},
name,
diff --git a/crates/hir-expand/src/builtin/quote.rs b/crates/hir-expand/src/builtin/quote.rs
index 70c38d4..84dd4a2 100644
--- a/crates/hir-expand/src/builtin/quote.rs
+++ b/crates/hir-expand/src/builtin/quote.rs
@@ -229,8 +229,6 @@
use span::{Edition, ROOT_ERASED_FILE_AST_ID, SpanAnchor, SyntaxContext};
use syntax::{TextRange, TextSize};
- use super::quote;
-
const DUMMY: tt::Span = tt::Span {
range: TextRange::empty(TextSize::new(0)),
anchor: SpanAnchor {
diff --git a/crates/hir-ty/src/lib.rs b/crates/hir-ty/src/lib.rs
index 451622e..2e59a48 100644
--- a/crates/hir-ty/src/lib.rs
+++ b/crates/hir-ty/src/lib.rs
@@ -3,45 +3,24 @@
#![cfg_attr(feature = "in-rust-tree", feature(rustc_private))]
-#[cfg(feature = "in-rust-tree")]
-extern crate rustc_index;
+// FIXME: We used to import `rustc_*` deps from `rustc_private` with `feature = "in-rust-tree" but
+// temporarily switched to crates.io versions due to hardships that working on them from rustc
+// demands corresponding changes on rust-analyzer at the same time.
+// For details, see the zulip discussion below:
+// https://rust-lang.zulipchat.com/#narrow/channel/185405-t-compiler.2Frust-analyzer/topic/relying.20on.20in-tree.20.60rustc_type_ir.60.2F.60rustc_next_trait_solver.60/with/541055689
-#[cfg(not(feature = "in-rust-tree"))]
extern crate ra_ap_rustc_index as rustc_index;
-#[cfg(feature = "in-rust-tree")]
-extern crate rustc_abi;
-
-#[cfg(not(feature = "in-rust-tree"))]
extern crate ra_ap_rustc_abi as rustc_abi;
-#[cfg(feature = "in-rust-tree")]
-extern crate rustc_pattern_analysis;
-
-#[cfg(not(feature = "in-rust-tree"))]
extern crate ra_ap_rustc_pattern_analysis as rustc_pattern_analysis;
-#[cfg(feature = "in-rust-tree")]
-extern crate rustc_ast_ir;
-
-#[cfg(not(feature = "in-rust-tree"))]
extern crate ra_ap_rustc_ast_ir as rustc_ast_ir;
-#[cfg(feature = "in-rust-tree")]
-extern crate rustc_type_ir;
-
-#[cfg(not(feature = "in-rust-tree"))]
extern crate ra_ap_rustc_type_ir as rustc_type_ir;
-#[cfg(feature = "in-rust-tree")]
-extern crate rustc_next_trait_solver;
-
-#[cfg(not(feature = "in-rust-tree"))]
extern crate ra_ap_rustc_next_trait_solver as rustc_next_trait_solver;
-#[cfg(feature = "in-rust-tree")]
-extern crate rustc_data_structures as ena;
-
mod builder;
mod chalk_db;
mod chalk_ext;
diff --git a/crates/hir-ty/src/next_solver/consts.rs b/crates/hir-ty/src/next_solver/consts.rs
index 7ebefa7..0b35820 100644
--- a/crates/hir-ty/src/next_solver/consts.rs
+++ b/crates/hir-ty/src/next_solver/consts.rs
@@ -36,8 +36,6 @@
internee: kind,
flags: flags.flags,
outer_exclusive_binder: flags.outer_exclusive_binder,
- #[cfg(feature = "in-rust-tree")]
- stable_hash: ena::fingerprint::Fingerprint::ZERO,
};
Const::new_(interner.db(), InternedWrapperNoDebug(cached))
}
diff --git a/crates/hir-ty/src/next_solver/predicate.rs b/crates/hir-ty/src/next_solver/predicate.rs
index 8654541..99b1354 100644
--- a/crates/hir-ty/src/next_solver/predicate.rs
+++ b/crates/hir-ty/src/next_solver/predicate.rs
@@ -227,8 +227,6 @@
internee: kind,
flags: flags.flags,
outer_exclusive_binder: flags.outer_exclusive_binder,
- #[cfg(feature = "in-rust-tree")]
- stable_hash: ena::fingerprint::Fingerprint::ZERO,
};
Predicate::new_(interner.db(), InternedWrapperNoDebug(cached))
}
diff --git a/crates/hir-ty/src/next_solver/ty.rs b/crates/hir-ty/src/next_solver/ty.rs
index c7a747a..70139e8 100644
--- a/crates/hir-ty/src/next_solver/ty.rs
+++ b/crates/hir-ty/src/next_solver/ty.rs
@@ -60,8 +60,6 @@
internee: kind,
flags: flags.flags,
outer_exclusive_binder: flags.outer_exclusive_binder,
- #[cfg(feature = "in-rust-tree")]
- stable_hash: ena::fingerprint::Fingerprint::ZERO,
};
Ty::new_(interner.db(), InternedWrapperNoDebug(cached))
}
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index f8dacf0..027a386 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -20,10 +20,6 @@
#![cfg_attr(feature = "in-rust-tree", feature(rustc_private))]
#![recursion_limit = "512"]
-#[cfg(feature = "in-rust-tree")]
-extern crate rustc_type_ir;
-
-#[cfg(not(feature = "in-rust-tree"))]
extern crate ra_ap_rustc_type_ir as rustc_type_ir;
mod attrs;