Update chalk to 0.26.0
This commit is contained in:
parent
ed784023e5
commit
61b2a6f5e5
5 changed files with 29 additions and 24 deletions
|
@ -11,7 +11,6 @@ use rustc_middle::ty::subst::{InternalSubsts, Subst, SubstsRef};
|
|||
use rustc_middle::ty::{self, AssocItemContainer, AssocKind, TyCtxt, TypeFoldable};
|
||||
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_hir::Unsafety;
|
||||
|
||||
use rustc_span::symbol::sym;
|
||||
|
||||
|
@ -19,6 +18,7 @@ use std::fmt;
|
|||
use std::sync::Arc;
|
||||
|
||||
use crate::chalk::lowering::{self, LowerInto};
|
||||
use rustc_hir::Unsafety;
|
||||
|
||||
pub struct RustIrDatabase<'tcx> {
|
||||
pub(crate) interner: RustInterner<'tcx>,
|
||||
|
@ -247,12 +247,14 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
|
|||
};
|
||||
Arc::new(chalk_solve::rust_ir::FnDefDatum {
|
||||
id: fn_def_id,
|
||||
abi: sig.abi(),
|
||||
safety: match sig.unsafety() {
|
||||
Unsafety::Normal => chalk_ir::Safety::Safe,
|
||||
Unsafety::Unsafe => chalk_ir::Safety::Unsafe,
|
||||
sig: chalk_ir::FnSig {
|
||||
abi: sig.abi(),
|
||||
safety: match sig.unsafety() {
|
||||
Unsafety::Normal => chalk_ir::Safety::Safe,
|
||||
Unsafety::Unsafe => chalk_ir::Safety::Unsafe,
|
||||
},
|
||||
variadic: sig.c_variadic(),
|
||||
},
|
||||
variadic: sig.c_variadic(),
|
||||
binders: chalk_ir::Binders::new(binders, bound),
|
||||
})
|
||||
}
|
||||
|
|
|
@ -340,18 +340,20 @@ impl<'tcx> LowerInto<'tcx, chalk_ir::Ty<RustInterner<'tcx>>> for Ty<'tcx> {
|
|||
collect_bound_vars(interner, interner.tcx, &sig.inputs_and_output());
|
||||
TyData::Function(chalk_ir::FnPointer {
|
||||
num_binders: binders.len(interner),
|
||||
sig: chalk_ir::FnSig {
|
||||
abi: sig.abi(),
|
||||
safety: match sig.unsafety() {
|
||||
rustc_hir::Unsafety::Normal => chalk_ir::Safety::Safe,
|
||||
rustc_hir::Unsafety::Unsafe => chalk_ir::Safety::Unsafe,
|
||||
},
|
||||
variadic: sig.c_variadic(),
|
||||
},
|
||||
substitution: chalk_ir::Substitution::from_iter(
|
||||
interner,
|
||||
inputs_and_outputs.iter().map(|ty| {
|
||||
chalk_ir::GenericArgData::Ty(ty.lower_into(interner)).intern(interner)
|
||||
}),
|
||||
),
|
||||
abi: sig.abi(),
|
||||
safety: match sig.unsafety() {
|
||||
rustc_hir::Unsafety::Normal => chalk_ir::Safety::Safe,
|
||||
rustc_hir::Unsafety::Unsafe => chalk_ir::Safety::Unsafe,
|
||||
},
|
||||
variadic: sig.c_variadic(),
|
||||
})
|
||||
.intern(interner)
|
||||
}
|
||||
|
@ -480,6 +482,7 @@ impl<'tcx> LowerInto<'tcx, Ty<'tcx>> for &chalk_ir::Ty<RustInterner<'tcx>> {
|
|||
substs: application_ty.substitution.lower_into(interner),
|
||||
item_def_id: assoc_ty.0,
|
||||
}),
|
||||
chalk_ir::TypeName::Foreign(def_id) => ty::Foreign(def_id.0),
|
||||
chalk_ir::TypeName::Error => unimplemented!(),
|
||||
},
|
||||
TyData::Placeholder(placeholder) => ty::Placeholder(ty::Placeholder {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue