Update Chalk

This commit is contained in:
Jack Huey 2020-05-27 19:27:53 -04:00
parent e997375934
commit 90e01ee208
4 changed files with 16 additions and 11 deletions

View file

@ -435,7 +435,7 @@ dependencies = [
[[package]]
name = "chalk-base"
version = "0.10.1-dev"
source = "git+https://github.com/jackh726/chalk.git?rev=58e5a31f48ddd4b940c682e7079d3e79e6ffaa1b#58e5a31f48ddd4b940c682e7079d3e79e6ffaa1b"
source = "git+https://github.com/jackh726/chalk.git?rev=c8f342bf5e48051333d0b2c7fab81347fc21c474#c8f342bf5e48051333d0b2c7fab81347fc21c474"
dependencies = [
"lazy_static",
]
@ -443,7 +443,7 @@ dependencies = [
[[package]]
name = "chalk-derive"
version = "0.10.1-dev"
source = "git+https://github.com/jackh726/chalk.git?rev=58e5a31f48ddd4b940c682e7079d3e79e6ffaa1b#58e5a31f48ddd4b940c682e7079d3e79e6ffaa1b"
source = "git+https://github.com/jackh726/chalk.git?rev=c8f342bf5e48051333d0b2c7fab81347fc21c474#c8f342bf5e48051333d0b2c7fab81347fc21c474"
dependencies = [
"proc-macro2 1.0.3",
"quote 1.0.2",
@ -454,7 +454,7 @@ dependencies = [
[[package]]
name = "chalk-engine"
version = "0.10.1-dev"
source = "git+https://github.com/jackh726/chalk.git?rev=58e5a31f48ddd4b940c682e7079d3e79e6ffaa1b#58e5a31f48ddd4b940c682e7079d3e79e6ffaa1b"
source = "git+https://github.com/jackh726/chalk.git?rev=c8f342bf5e48051333d0b2c7fab81347fc21c474#c8f342bf5e48051333d0b2c7fab81347fc21c474"
dependencies = [
"chalk-base",
"chalk-derive",
@ -465,7 +465,7 @@ dependencies = [
[[package]]
name = "chalk-ir"
version = "0.10.1-dev"
source = "git+https://github.com/jackh726/chalk.git?rev=58e5a31f48ddd4b940c682e7079d3e79e6ffaa1b#58e5a31f48ddd4b940c682e7079d3e79e6ffaa1b"
source = "git+https://github.com/jackh726/chalk.git?rev=c8f342bf5e48051333d0b2c7fab81347fc21c474#c8f342bf5e48051333d0b2c7fab81347fc21c474"
dependencies = [
"chalk-base",
"chalk-derive",
@ -474,7 +474,7 @@ dependencies = [
[[package]]
name = "chalk-solve"
version = "0.10.1-dev"
source = "git+https://github.com/jackh726/chalk.git?rev=58e5a31f48ddd4b940c682e7079d3e79e6ffaa1b#58e5a31f48ddd4b940c682e7079d3e79e6ffaa1b"
source = "git+https://github.com/jackh726/chalk.git?rev=c8f342bf5e48051333d0b2c7fab81347fc21c474#c8f342bf5e48051333d0b2c7fab81347fc21c474"
dependencies = [
"chalk-base",
"chalk-derive",

View file

@ -30,7 +30,7 @@ rustc_serialize = { path = "../librustc_serialize" }
rustc_ast = { path = "../librustc_ast" }
rustc_span = { path = "../librustc_span" }
byteorder = { version = "1.3" }
chalk-ir = { git = "https://github.com/jackh726/chalk.git", rev = "58e5a31f48ddd4b940c682e7079d3e79e6ffaa1b" }
chalk-ir = { git = "https://github.com/jackh726/chalk.git", rev = "c8f342bf5e48051333d0b2c7fab81347fc21c474" }
#chalk-ir = "0.10.0"
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
measureme = "0.7.1"

View file

@ -19,8 +19,8 @@ rustc_span = { path = "../librustc_span" }
#chalk-ir = "0.10.0"
#chalk-rust-ir = "0.10.0"
#chalk-solve = "0.10.0"
chalk-solve = { git = "https://github.com/jackh726/chalk.git", rev = "58e5a31f48ddd4b940c682e7079d3e79e6ffaa1b" }
chalk-ir = { git = "https://github.com/jackh726/chalk.git", rev = "58e5a31f48ddd4b940c682e7079d3e79e6ffaa1b" }
chalk-solve = { git = "https://github.com/jackh726/chalk.git", rev = "c8f342bf5e48051333d0b2c7fab81347fc21c474" }
chalk-ir = { git = "https://github.com/jackh726/chalk.git", rev = "c8f342bf5e48051333d0b2c7fab81347fc21c474" }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
rustc_infer = { path = "../librustc_infer" }
rustc_trait_selection = { path = "../librustc_trait_selection" }

View file

@ -321,10 +321,7 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
opaque_ty_id: chalk_ir::OpaqueTyId<RustInterner<'tcx>>,
) -> Arc<chalk_solve::rust_ir::OpaqueTyDatum<RustInterner<'tcx>>> {
// FIXME(chalk): actually lower opaque ty
let hidden_ty =
self.tcx.mk_ty(ty::Tuple(self.tcx.intern_substs(&[]))).lower_into(&self.interner);
let value = chalk_solve::rust_ir::OpaqueTyDatumBound {
hidden_ty,
bounds: chalk_ir::Binders::new(chalk_ir::VariableKinds::new(&self.interner), vec![]),
};
Arc::new(chalk_solve::rust_ir::OpaqueTyDatum {
@ -418,6 +415,14 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
fn is_object_safe(&self, trait_id: chalk_ir::TraitId<RustInterner<'tcx>>) -> bool {
self.tcx.is_object_safe(trait_id.0)
}
fn hidden_opaque_type(
&self,
_id: chalk_ir::OpaqueTyId<RustInterner<'tcx>>,
) -> chalk_ir::Ty<RustInterner<'tcx>> {
// FIXME(chalk): actually get hidden ty
self.tcx.mk_ty(ty::Tuple(self.tcx.intern_substs(&[]))).lower_into(&self.interner)
}
}
/// Creates a `InternalSubsts` that maps each generic parameter to a higher-ranked