mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Update chalk to 0.26.0
This commit is contained in:
parent
ed784023e5
commit
61b2a6f5e5
16
Cargo.lock
16
Cargo.lock
@ -427,9 +427,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "chalk-derive"
|
||||
version = "0.25.0"
|
||||
version = "0.26.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "624e14d3f029186e6ffd97081ffa082f98ddd5df20655b6f0e8efb83dd8ac8b4"
|
||||
checksum = "72aade21de1aa12a31fc287ec9891915965b6d7caac1c5de5ea095b6b9bc4cc4"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@ -439,9 +439,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "chalk-engine"
|
||||
version = "0.25.0"
|
||||
version = "0.26.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fd172df00ff1de4789ed8971e1623afb10551041a9385d3b4e22fe6b1e8a0d1d"
|
||||
checksum = "fcffc1240cc5f9c5d1d8028d35a293e193a647a71244d51d3d5b4295cbea0593"
|
||||
dependencies = [
|
||||
"chalk-derive",
|
||||
"chalk-ir",
|
||||
@ -452,9 +452,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "chalk-ir"
|
||||
version = "0.25.0"
|
||||
version = "0.26.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "118c68eccdda5604af50bbef84c94550f3854f76989cb03c36ffd36cc2ffe958"
|
||||
checksum = "6b856e69b664ca362a30c21f477fe10f59f74458978bc9bfd667820549bc7758"
|
||||
dependencies = [
|
||||
"chalk-derive",
|
||||
"lazy_static",
|
||||
@ -462,9 +462,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "chalk-solve"
|
||||
version = "0.25.0"
|
||||
version = "0.26.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "45b235a1f568b28707f117b2d30eabbee9cbcfccaa0d6e9697300400c8ca0996"
|
||||
checksum = "abae2ca9cca3b0a2f33fe946a688881a8b17b8edc088fe3820cb770275e965ed"
|
||||
dependencies = [
|
||||
"chalk-derive",
|
||||
"chalk-ir",
|
||||
|
@ -26,7 +26,7 @@ rustc_index = { path = "../rustc_index" }
|
||||
rustc_serialize = { path = "../rustc_serialize" }
|
||||
rustc_ast = { path = "../rustc_ast" }
|
||||
rustc_span = { path = "../rustc_span" }
|
||||
chalk-ir = "0.25.0"
|
||||
chalk-ir = "0.26.0"
|
||||
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
|
||||
measureme = "0.7.1"
|
||||
rustc_session = { path = "../rustc_session" }
|
||||
|
@ -12,9 +12,9 @@ rustc_hir = { path = "../rustc_hir" }
|
||||
rustc_index = { path = "../rustc_index" }
|
||||
rustc_ast = { path = "../rustc_ast" }
|
||||
rustc_span = { path = "../rustc_span" }
|
||||
chalk-ir = "0.25.0"
|
||||
chalk-solve = "0.25.0"
|
||||
chalk-engine = "0.25.0"
|
||||
chalk-ir = "0.26.0"
|
||||
chalk-solve = "0.26.0"
|
||||
chalk-engine = "0.26.0"
|
||||
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
|
||||
rustc_infer = { path = "../rustc_infer" }
|
||||
rustc_trait_selection = { path = "../rustc_trait_selection" }
|
||||
|
@ -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,
|
||||
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(),
|
||||
},
|
||||
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),
|
||||
substitution: chalk_ir::Substitution::from_iter(
|
||||
interner,
|
||||
inputs_and_outputs.iter().map(|ty| {
|
||||
chalk_ir::GenericArgData::Ty(ty.lower_into(interner)).intern(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)
|
||||
}),
|
||||
),
|
||||
})
|
||||
.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…
Reference in New Issue
Block a user