Skip to content

Commit d7ebac7

Browse files
committed
Switch next-solver related rustc dependencies of r-a to crates.io ones
1 parent 4056082 commit d7ebac7

File tree

10 files changed

+8
-31
lines changed

10 files changed

+8
-31
lines changed

src/tools/rust-analyzer/crates/hir-ty/src/lib.rs

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ extern crate rustc_index;
99
#[cfg(not(feature = "in-rust-tree"))]
1010
extern crate ra_ap_rustc_index as rustc_index;
1111

12+
extern crate ra_ap_rustc_index as rustc_index_nextsolver;
13+
1214
#[cfg(feature = "in-rust-tree")]
1315
extern crate rustc_abi;
1416

@@ -21,27 +23,12 @@ extern crate rustc_pattern_analysis;
2123
#[cfg(not(feature = "in-rust-tree"))]
2224
extern crate ra_ap_rustc_pattern_analysis as rustc_pattern_analysis;
2325

24-
#[cfg(feature = "in-rust-tree")]
25-
extern crate rustc_ast_ir;
26-
27-
#[cfg(not(feature = "in-rust-tree"))]
2826
extern crate ra_ap_rustc_ast_ir as rustc_ast_ir;
2927

30-
#[cfg(feature = "in-rust-tree")]
31-
extern crate rustc_type_ir;
32-
33-
#[cfg(not(feature = "in-rust-tree"))]
3428
extern crate ra_ap_rustc_type_ir as rustc_type_ir;
3529

36-
#[cfg(feature = "in-rust-tree")]
37-
extern crate rustc_next_trait_solver;
38-
39-
#[cfg(not(feature = "in-rust-tree"))]
4030
extern crate ra_ap_rustc_next_trait_solver as rustc_next_trait_solver;
4131

42-
#[cfg(feature = "in-rust-tree")]
43-
extern crate rustc_data_structures as ena;
44-
4532
mod builder;
4633
mod chalk_db;
4734
mod chalk_ext;

src/tools/rust-analyzer/crates/hir-ty/src/next_solver/consts.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ impl<'db> Const<'db> {
3636
internee: kind,
3737
flags: flags.flags,
3838
outer_exclusive_binder: flags.outer_exclusive_binder,
39-
#[cfg(feature = "in-rust-tree")]
40-
stable_hash: ena::fingerprint::Fingerprint::ZERO,
4139
};
4240
Const::new_(interner.db(), InternedWrapperNoDebug(cached))
4341
}

src/tools/rust-analyzer/crates/hir-ty/src/next_solver/infer/canonical/canonicalizer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//! [c]: https://rust-lang.github.io/chalk/book/canonical_queries/canonicalization.html
77
88
use rustc_hash::FxHashMap;
9-
use rustc_index::Idx;
9+
use rustc_index_nextsolver::Idx;
1010
use rustc_type_ir::InferTy::{self, FloatVar, IntVar, TyVar};
1111
use rustc_type_ir::inherent::{Const as _, IntoKind as _, Region as _, SliceLike, Ty as _};
1212
use rustc_type_ir::{

src/tools/rust-analyzer/crates/hir-ty/src/next_solver/infer/canonical/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use crate::next_solver::{
3131
},
3232
};
3333
use instantiate::CanonicalExt;
34-
use rustc_index::IndexVec;
34+
use rustc_index_nextsolver::IndexVec;
3535
use rustc_type_ir::inherent::IntoKind;
3636
use rustc_type_ir::{
3737
AliasRelationDirection, AliasTyKind, CanonicalVarKind, InferTy, TypeFoldable, UniverseIndex,

src/tools/rust-analyzer/crates/hir-ty/src/next_solver/infer/region_constraints/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::{cmp, fmt, mem};
77
use ena::undo_log::{Rollback, UndoLogs};
88
use ena::unify as ut;
99
use rustc_hash::FxHashMap;
10-
use rustc_index::IndexVec;
10+
use rustc_index_nextsolver::IndexVec;
1111
use rustc_type_ir::inherent::IntoKind;
1212
use rustc_type_ir::{RegionKind, RegionVid, UniverseIndex};
1313
use tracing::{debug, instrument};

src/tools/rust-analyzer/crates/hir-ty/src/next_solver/infer/type_variable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::ops::Range;
77
use ena::snapshot_vec as sv;
88
use ena::undo_log::Rollback;
99
use ena::unify as ut;
10-
use rustc_index::IndexVec;
10+
use rustc_index_nextsolver::IndexVec;
1111
use rustc_type_ir::TyVid;
1212
use rustc_type_ir::UniverseIndex;
1313
use rustc_type_ir::inherent::Ty as _;

src/tools/rust-analyzer/crates/hir-ty/src/next_solver/interner.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use intern::{Interned, impl_internable, sym};
1313
use la_arena::Idx;
1414
use rustc_abi::{Align, ReprFlags, ReprOptions};
1515
use rustc_hash::FxHashSet;
16-
use rustc_index::bit_set::DenseBitSet;
16+
use rustc_index_nextsolver::bit_set::DenseBitSet;
1717
use rustc_type_ir::elaborate::elaborate;
1818
use rustc_type_ir::error::TypeError;
1919
use rustc_type_ir::inherent::{
@@ -33,7 +33,7 @@ use syntax::ast::SelfParamKind;
3333
use triomphe::Arc;
3434

3535
use rustc_ast_ir::visit::VisitorResult;
36-
use rustc_index::IndexVec;
36+
use rustc_index_nextsolver::IndexVec;
3737
use rustc_type_ir::TypeVisitableExt;
3838
use rustc_type_ir::{
3939
BoundVar, CollectAndApply, DebruijnIndex, GenericArgKind, RegionKind, TermKind, UniverseIndex,

src/tools/rust-analyzer/crates/hir-ty/src/next_solver/predicate.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,6 @@ impl<'db> Predicate<'db> {
227227
internee: kind,
228228
flags: flags.flags,
229229
outer_exclusive_binder: flags.outer_exclusive_binder,
230-
#[cfg(feature = "in-rust-tree")]
231-
stable_hash: ena::fingerprint::Fingerprint::ZERO,
232230
};
233231
Predicate::new_(interner.db(), InternedWrapperNoDebug(cached))
234232
}

src/tools/rust-analyzer/crates/hir-ty/src/next_solver/ty.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ impl<'db> Ty<'db> {
6060
internee: kind,
6161
flags: flags.flags,
6262
outer_exclusive_binder: flags.outer_exclusive_binder,
63-
#[cfg(feature = "in-rust-tree")]
64-
stable_hash: ena::fingerprint::Fingerprint::ZERO,
6563
};
6664
Ty::new_(interner.db(), InternedWrapperNoDebug(cached))
6765
}

src/tools/rust-analyzer/crates/hir/src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@
2020
#![cfg_attr(feature = "in-rust-tree", feature(rustc_private))]
2121
#![recursion_limit = "512"]
2222

23-
#[cfg(feature = "in-rust-tree")]
24-
extern crate rustc_type_ir;
25-
26-
#[cfg(not(feature = "in-rust-tree"))]
2723
extern crate ra_ap_rustc_type_ir as rustc_type_ir;
2824

2925
mod attrs;

0 commit comments

Comments
 (0)