Skip to content

Commit f2b3fdb

Browse files
Merge pull request #20888 from ShoyuVanilla/bump-rustc-deps
internal: Bump rustc deps
2 parents f362735 + feb29b6 commit f2b3fdb

File tree

14 files changed

+300
-261
lines changed

14 files changed

+300
-261
lines changed

Cargo.lock

Lines changed: 22 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,14 @@ vfs-notify = { path = "./crates/vfs-notify", version = "0.0.0" }
8686
vfs = { path = "./crates/vfs", version = "0.0.0" }
8787
edition = { path = "./crates/edition", version = "0.0.0" }
8888

89-
ra-ap-rustc_lexer = { version = "0.133", default-features = false }
90-
ra-ap-rustc_parse_format = { version = "0.133", default-features = false }
91-
ra-ap-rustc_index = { version = "0.133", default-features = false }
92-
ra-ap-rustc_abi = { version = "0.133", default-features = false }
93-
ra-ap-rustc_pattern_analysis = { version = "0.133", default-features = false }
94-
ra-ap-rustc_ast_ir = { version = "0.133", default-features = false }
95-
ra-ap-rustc_type_ir = { version = "0.133", default-features = false }
96-
ra-ap-rustc_next_trait_solver = { version = "0.133", default-features = false }
89+
ra-ap-rustc_lexer = { version = "0.137", default-features = false }
90+
ra-ap-rustc_parse_format = { version = "0.137", default-features = false }
91+
ra-ap-rustc_index = { version = "0.137", default-features = false }
92+
ra-ap-rustc_abi = { version = "0.137", default-features = false }
93+
ra-ap-rustc_pattern_analysis = { version = "0.137", default-features = false }
94+
ra-ap-rustc_ast_ir = { version = "0.137", default-features = false }
95+
ra-ap-rustc_type_ir = { version = "0.137", default-features = false }
96+
ra-ap-rustc_next_trait_solver = { version = "0.137", default-features = false }
9797

9898
# local crates that aren't published to crates.io. These should not have versions.
9999

crates/hir-ty/src/display.rs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ use rustc_apfloat::{
3838
use rustc_ast_ir::FloatTy;
3939
use rustc_hash::FxHashSet;
4040
use rustc_type_ir::{
41-
AliasTyKind, CoroutineArgsParts, RegionKind, Upcast,
41+
AliasTyKind, BoundVarIndexKind, CoroutineArgsParts, RegionKind, Upcast,
4242
inherent::{AdtDef, GenericArgs as _, IntoKind, SliceLike, Term as _, Ty as _, Tys as _},
4343
};
4444
use smallvec::SmallVec;
@@ -682,9 +682,12 @@ impl<'db> HirDisplay<'db> for Const<'db> {
682682
fn hir_fmt(&self, f: &mut HirFormatter<'_, 'db>) -> Result<(), HirDisplayError> {
683683
match self.kind() {
684684
ConstKind::Placeholder(_) => write!(f, "<placeholder>"),
685-
ConstKind::Bound(db, bound_const) => {
685+
ConstKind::Bound(BoundVarIndexKind::Bound(db), bound_const) => {
686686
write!(f, "?{}.{}", db.as_u32(), bound_const.var.as_u32())
687687
}
688+
ConstKind::Bound(BoundVarIndexKind::Canonical, bound_const) => {
689+
write!(f, "?c.{}", bound_const.var.as_u32())
690+
}
688691
ConstKind::Infer(..) => write!(f, "#c#"),
689692
ConstKind::Param(param) => {
690693
let generics = generics(f.db, param.id.parent());
@@ -1525,9 +1528,12 @@ impl<'db> HirDisplay<'db> for Ty<'db> {
15251528
}
15261529
}
15271530
}
1528-
TyKind::Bound(debruijn, ty) => {
1531+
TyKind::Bound(BoundVarIndexKind::Bound(debruijn), ty) => {
15291532
write!(f, "?{}.{}", debruijn.as_usize(), ty.var.as_usize())?
15301533
}
1534+
TyKind::Bound(BoundVarIndexKind::Canonical, ty) => {
1535+
write!(f, "?c.{}", ty.var.as_usize())?
1536+
}
15311537
TyKind::Dynamic(bounds, region) => {
15321538
// We want to put auto traits after principal traits, regardless of their written order.
15331539
let mut bounds_to_display = SmallVec::<[_; 4]>::new();
@@ -1955,9 +1961,12 @@ impl<'db> HirDisplay<'db> for Region<'db> {
19551961
write!(f, "{}", param_data.name.display(f.db, f.edition()))?;
19561962
Ok(())
19571963
}
1958-
RegionKind::ReBound(db, idx) => {
1964+
RegionKind::ReBound(BoundVarIndexKind::Bound(db), idx) => {
19591965
write!(f, "?{}.{}", db.as_u32(), idx.var.as_u32())
19601966
}
1967+
RegionKind::ReBound(BoundVarIndexKind::Canonical, idx) => {
1968+
write!(f, "?c.{}", idx.var.as_u32())
1969+
}
19611970
RegionKind::ReVar(_) => write!(f, "_"),
19621971
RegionKind::ReStatic => write!(f, "'static"),
19631972
RegionKind::ReError(..) => {

crates/hir-ty/src/lib.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ use la_arena::Idx;
6161
use mir::{MirEvalError, VTableMap};
6262
use rustc_hash::{FxBuildHasher, FxHashMap, FxHashSet};
6363
use rustc_type_ir::{
64-
TypeSuperVisitable, TypeVisitableExt, UpcastFrom,
64+
BoundVarIndexKind, TypeSuperVisitable, TypeVisitableExt, UpcastFrom,
6565
inherent::{IntoKind, SliceLike, Ty as _},
6666
};
6767
use syntax::ast::{ConstArg, make};
@@ -405,7 +405,7 @@ where
405405
))
406406
}
407407
TyKind::Infer(_) => error(),
408-
TyKind::Bound(index, _) if index > self.binder => error(),
408+
TyKind::Bound(BoundVarIndexKind::Bound(index), _) if index > self.binder => error(),
409409
_ => t.try_super_fold_with(self),
410410
}
411411
}
@@ -432,7 +432,9 @@ where
432432
Ok(Const::new_bound(self.interner, self.binder, BoundConst { var }))
433433
}
434434
ConstKind::Infer(_) => error(),
435-
ConstKind::Bound(index, _) if index > self.binder => error(),
435+
ConstKind::Bound(BoundVarIndexKind::Bound(index), _) if index > self.binder => {
436+
error()
437+
}
436438
_ => ct.try_super_fold_with(self),
437439
}
438440
}
@@ -454,7 +456,9 @@ where
454456
))
455457
}
456458
RegionKind::ReVar(_) => error(),
457-
RegionKind::ReBound(index, _) if index > self.binder => error(),
459+
RegionKind::ReBound(BoundVarIndexKind::Bound(index), _) if index > self.binder => {
460+
error()
461+
}
458462
_ => Ok(region),
459463
}
460464
}

crates/hir-ty/src/lower.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ use rustc_ast_ir::Mutability;
4242
use rustc_hash::FxHashSet;
4343
use rustc_pattern_analysis::Captures;
4444
use rustc_type_ir::{
45-
AliasTyKind, ConstKind, DebruijnIndex, ExistentialPredicate, ExistentialProjection,
46-
ExistentialTraitRef, FnSig, OutlivesPredicate,
45+
AliasTyKind, BoundVarIndexKind, ConstKind, DebruijnIndex, ExistentialPredicate,
46+
ExistentialProjection, ExistentialTraitRef, FnSig, OutlivesPredicate,
4747
TyKind::{self},
4848
TypeVisitableExt,
4949
inherent::{GenericArg as _, GenericArgs as _, IntoKind as _, Region as _, SliceLike, Ty as _},
@@ -858,11 +858,13 @@ impl<'db, 'a> TyLoweringContext<'db, 'a> {
858858
if let Some(bounds) = bounds {
859859
let region = match lifetime {
860860
Some(it) => match it.kind() {
861-
rustc_type_ir::RegionKind::ReBound(db, var) => Region::new_bound(
862-
self.interner,
863-
db.shifted_out_to_binder(DebruijnIndex::from_u32(2)),
864-
var,
865-
),
861+
rustc_type_ir::RegionKind::ReBound(BoundVarIndexKind::Bound(db), var) => {
862+
Region::new_bound(
863+
self.interner,
864+
db.shifted_out_to_binder(DebruijnIndex::from_u32(2)),
865+
var,
866+
)
867+
}
866868
_ => it,
867869
},
868870
None => Region::new_static(self.interner),

crates/hir-ty/src/next_solver/consts.rs

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ use hir_def::ConstParamId;
66
use macros::{TypeFoldable, TypeVisitable};
77
use rustc_ast_ir::visit::VisitorResult;
88
use rustc_type_ir::{
9-
BoundVar, DebruijnIndex, FlagComputation, Flags, TypeFoldable, TypeSuperFoldable,
10-
TypeSuperVisitable, TypeVisitable, TypeVisitableExt, WithCachedTypeInfo,
9+
BoundVar, BoundVarIndexKind, ConstVid, DebruijnIndex, FlagComputation, Flags, InferConst,
10+
TypeFoldable, TypeSuperFoldable, TypeSuperVisitable, TypeVisitable, TypeVisitableExt,
11+
WithCachedTypeInfo,
1112
inherent::{IntoKind, ParamEnv as _, PlaceholderLike, SliceLike},
1213
relate::Relate,
1314
};
@@ -49,19 +50,19 @@ impl<'db> Const<'db> {
4950
}
5051

5152
pub fn error(interner: DbInterner<'db>) -> Self {
52-
Const::new(interner, rustc_type_ir::ConstKind::Error(ErrorGuaranteed))
53+
Const::new(interner, ConstKind::Error(ErrorGuaranteed))
5354
}
5455

5556
pub fn new_param(interner: DbInterner<'db>, param: ParamConst) -> Self {
56-
Const::new(interner, rustc_type_ir::ConstKind::Param(param))
57+
Const::new(interner, ConstKind::Param(param))
5758
}
5859

5960
pub fn new_placeholder(interner: DbInterner<'db>, placeholder: PlaceholderConst) -> Self {
6061
Const::new(interner, ConstKind::Placeholder(placeholder))
6162
}
6263

6364
pub fn new_bound(interner: DbInterner<'db>, index: DebruijnIndex, bound: BoundConst) -> Self {
64-
Const::new(interner, ConstKind::Bound(index, bound))
65+
Const::new(interner, ConstKind::Bound(BoundVarIndexKind::Bound(index), bound))
6566
}
6667

6768
pub fn new_valtree(
@@ -340,28 +341,34 @@ impl<'db> Flags for Const<'db> {
340341
}
341342

342343
impl<'db> rustc_type_ir::inherent::Const<DbInterner<'db>> for Const<'db> {
343-
fn new_infer(interner: DbInterner<'db>, var: rustc_type_ir::InferConst) -> Self {
344+
fn new_infer(interner: DbInterner<'db>, var: InferConst) -> Self {
344345
Const::new(interner, ConstKind::Infer(var))
345346
}
346347

347-
fn new_var(interner: DbInterner<'db>, var: rustc_type_ir::ConstVid) -> Self {
348-
Const::new(interner, ConstKind::Infer(rustc_type_ir::InferConst::Var(var)))
348+
fn new_var(interner: DbInterner<'db>, var: ConstVid) -> Self {
349+
Const::new(interner, ConstKind::Infer(InferConst::Var(var)))
349350
}
350351

351-
fn new_bound(
352-
interner: DbInterner<'db>,
353-
debruijn: rustc_type_ir::DebruijnIndex,
354-
var: BoundConst,
355-
) -> Self {
356-
Const::new(interner, ConstKind::Bound(debruijn, var))
352+
fn new_bound(interner: DbInterner<'db>, debruijn: DebruijnIndex, var: BoundConst) -> Self {
353+
Const::new(interner, ConstKind::Bound(BoundVarIndexKind::Bound(debruijn), var))
354+
}
355+
356+
fn new_anon_bound(interner: DbInterner<'db>, debruijn: DebruijnIndex, var: BoundVar) -> Self {
357+
Const::new(
358+
interner,
359+
ConstKind::Bound(BoundVarIndexKind::Bound(debruijn), BoundConst { var }),
360+
)
357361
}
358362

359-
fn new_anon_bound(
363+
fn new_canonical_bound(interner: DbInterner<'db>, var: BoundVar) -> Self {
364+
Const::new(interner, ConstKind::Bound(BoundVarIndexKind::Canonical, BoundConst { var }))
365+
}
366+
367+
fn new_placeholder(
360368
interner: DbInterner<'db>,
361-
debruijn: rustc_type_ir::DebruijnIndex,
362-
var: rustc_type_ir::BoundVar,
369+
param: <DbInterner<'db> as rustc_type_ir::Interner>::PlaceholderConst,
363370
) -> Self {
364-
Const::new(interner, ConstKind::Bound(debruijn, BoundConst { var }))
371+
Const::new(interner, ConstKind::Placeholder(param))
365372
}
366373

367374
fn new_unevaluated(
@@ -378,13 +385,6 @@ impl<'db> rustc_type_ir::inherent::Const<DbInterner<'db>> for Const<'db> {
378385
fn new_error(interner: DbInterner<'db>, guar: ErrorGuaranteed) -> Self {
379386
Const::new(interner, ConstKind::Error(guar))
380387
}
381-
382-
fn new_placeholder(
383-
interner: DbInterner<'db>,
384-
param: <DbInterner<'db> as rustc_type_ir::Interner>::PlaceholderConst,
385-
) -> Self {
386-
Const::new(interner, ConstKind::Placeholder(param))
387-
}
388388
}
389389

390390
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]

0 commit comments

Comments
 (0)