mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 05:51:58 +00:00
Update Chalk
This commit is contained in:
parent
4b64bc1fc9
commit
a0622d60e0
20
Cargo.lock
20
Cargo.lock
@ -496,8 +496,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "chalk-derive"
|
name = "chalk-derive"
|
||||||
version = "0.47.0-dev.0"
|
version = "0.55.0"
|
||||||
source = "git+https://github.com/jackh726/chalk.git?rev=972534b01b54f96ff37e5afa4ce18d8a7cdd932d#972534b01b54f96ff37e5afa4ce18d8a7cdd932d"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3983193cacd81f0f924acb666b7fe5e1a0d81db9f113fa69203eda7ea8ce8b6c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@ -507,8 +508,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "chalk-engine"
|
name = "chalk-engine"
|
||||||
version = "0.47.0-dev.0"
|
version = "0.55.0"
|
||||||
source = "git+https://github.com/jackh726/chalk.git?rev=972534b01b54f96ff37e5afa4ce18d8a7cdd932d#972534b01b54f96ff37e5afa4ce18d8a7cdd932d"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "05a171ce5abbf0fbd06f221ab80ab182c7ef78603d23b858bc44e7ce8a86a396"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chalk-derive",
|
"chalk-derive",
|
||||||
"chalk-ir",
|
"chalk-ir",
|
||||||
@ -519,8 +521,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "chalk-ir"
|
name = "chalk-ir"
|
||||||
version = "0.47.0-dev.0"
|
version = "0.55.0"
|
||||||
source = "git+https://github.com/jackh726/chalk.git?rev=972534b01b54f96ff37e5afa4ce18d8a7cdd932d#972534b01b54f96ff37e5afa4ce18d8a7cdd932d"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a522f53af971e7678f472d687e053120157b3ae26e2ebd5ecbc0f5ab124f2cb6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"chalk-derive",
|
"chalk-derive",
|
||||||
@ -529,8 +532,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "chalk-solve"
|
name = "chalk-solve"
|
||||||
version = "0.47.0-dev.0"
|
version = "0.55.0"
|
||||||
source = "git+https://github.com/jackh726/chalk.git?rev=972534b01b54f96ff37e5afa4ce18d8a7cdd932d#972534b01b54f96ff37e5afa4ce18d8a7cdd932d"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "cdf79fb77a567e456a170f7ec84ea6584163d4ba3f13660cd182013d34ca667c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chalk-derive",
|
"chalk-derive",
|
||||||
"chalk-ir",
|
"chalk-ir",
|
||||||
|
@ -26,8 +26,7 @@ rustc_index = { path = "../rustc_index" }
|
|||||||
rustc_serialize = { path = "../rustc_serialize" }
|
rustc_serialize = { path = "../rustc_serialize" }
|
||||||
rustc_ast = { path = "../rustc_ast" }
|
rustc_ast = { path = "../rustc_ast" }
|
||||||
rustc_span = { path = "../rustc_span" }
|
rustc_span = { path = "../rustc_span" }
|
||||||
#chalk-ir = {"0.46.0"}
|
chalk-ir = "0.55.0"
|
||||||
chalk-ir = { git = "https://github.com/jackh726/chalk.git", rev = "972534b01b54f96ff37e5afa4ce18d8a7cdd932d" }
|
|
||||||
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
|
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
|
||||||
measureme = "9.0.0"
|
measureme = "9.0.0"
|
||||||
rustc_session = { path = "../rustc_session" }
|
rustc_session = { path = "../rustc_session" }
|
||||||
|
@ -87,17 +87,34 @@ impl<'tcx> chalk_ir::interner::Interner for RustInterner<'tcx> {
|
|||||||
write!(fmt, "{:?}", pci.consequence)?;
|
write!(fmt, "{:?}", pci.consequence)?;
|
||||||
|
|
||||||
let conditions = pci.conditions.interned();
|
let conditions = pci.conditions.interned();
|
||||||
|
let constraints = pci.constraints.interned();
|
||||||
|
|
||||||
let conds = conditions.len();
|
let conds = conditions.len();
|
||||||
if conds == 0 {
|
let consts = constraints.len();
|
||||||
|
if conds == 0 && consts == 0 {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
write!(fmt, " :- ")?;
|
write!(fmt, " :- ")?;
|
||||||
|
|
||||||
|
if conds != 0 {
|
||||||
for cond in &conditions[..conds - 1] {
|
for cond in &conditions[..conds - 1] {
|
||||||
write!(fmt, "{:?}, ", cond)?;
|
write!(fmt, "{:?}, ", cond)?;
|
||||||
}
|
}
|
||||||
write!(fmt, "{:?}", conditions[conds - 1])?;
|
write!(fmt, "{:?}", conditions[conds - 1])?;
|
||||||
|
}
|
||||||
|
|
||||||
|
if conds != 0 && consts != 0 {
|
||||||
|
write!(fmt, " ; ")?;
|
||||||
|
}
|
||||||
|
|
||||||
|
if consts != 0 {
|
||||||
|
for constraint in &constraints[..consts - 1] {
|
||||||
|
write!(fmt, "{:?}, ", constraint)?;
|
||||||
|
}
|
||||||
|
write!(fmt, "{:?}", constraints[consts - 1])?;
|
||||||
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
};
|
};
|
||||||
Some(write())
|
Some(write())
|
||||||
|
@ -13,12 +13,9 @@ rustc_hir = { path = "../rustc_hir" }
|
|||||||
rustc_index = { path = "../rustc_index" }
|
rustc_index = { path = "../rustc_index" }
|
||||||
rustc_ast = { path = "../rustc_ast" }
|
rustc_ast = { path = "../rustc_ast" }
|
||||||
rustc_span = { path = "../rustc_span" }
|
rustc_span = { path = "../rustc_span" }
|
||||||
#chalk-ir = "0.46.0"
|
chalk-ir = "0.55.0"
|
||||||
chalk-ir = { git = "https://github.com/jackh726/chalk.git", rev = "972534b01b54f96ff37e5afa4ce18d8a7cdd932d" }
|
chalk-solve = "0.55.0"
|
||||||
#chalk-solve = "0.46.0"
|
chalk-engine = "0.55.0"
|
||||||
chalk-solve = { git = "https://github.com/jackh726/chalk.git", rev = "972534b01b54f96ff37e5afa4ce18d8a7cdd932d" }
|
|
||||||
#chalk-engine = "0.46.0"
|
|
||||||
chalk-engine = { git = "https://github.com/jackh726/chalk.git", rev = "972534b01b54f96ff37e5afa4ce18d8a7cdd932d" }
|
|
||||||
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
|
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
|
||||||
rustc_infer = { path = "../rustc_infer" }
|
rustc_infer = { path = "../rustc_infer" }
|
||||||
rustc_trait_selection = { path = "../rustc_trait_selection" }
|
rustc_trait_selection = { path = "../rustc_trait_selection" }
|
||||||
|
@ -690,7 +690,7 @@ impl<'tcx> chalk_ir::UnificationDatabase<RustInterner<'tcx>> for RustIrDatabase<
|
|||||||
def_id: chalk_ir::FnDefId<RustInterner<'tcx>>,
|
def_id: chalk_ir::FnDefId<RustInterner<'tcx>>,
|
||||||
) -> chalk_ir::Variances<RustInterner<'tcx>> {
|
) -> chalk_ir::Variances<RustInterner<'tcx>> {
|
||||||
let variances = self.interner.tcx.variances_of(def_id.0);
|
let variances = self.interner.tcx.variances_of(def_id.0);
|
||||||
chalk_ir::Variances::from(
|
chalk_ir::Variances::from_iter(
|
||||||
&self.interner,
|
&self.interner,
|
||||||
variances.iter().map(|v| match v {
|
variances.iter().map(|v| match v {
|
||||||
ty::Variance::Invariant => chalk_ir::Variance::Invariant,
|
ty::Variance::Invariant => chalk_ir::Variance::Invariant,
|
||||||
@ -706,7 +706,7 @@ impl<'tcx> chalk_ir::UnificationDatabase<RustInterner<'tcx>> for RustIrDatabase<
|
|||||||
def_id: chalk_ir::AdtId<RustInterner<'tcx>>,
|
def_id: chalk_ir::AdtId<RustInterner<'tcx>>,
|
||||||
) -> chalk_ir::Variances<RustInterner<'tcx>> {
|
) -> chalk_ir::Variances<RustInterner<'tcx>> {
|
||||||
let variances = self.interner.tcx.variances_of(def_id.0.did);
|
let variances = self.interner.tcx.variances_of(def_id.0.did);
|
||||||
chalk_ir::Variances::from(
|
chalk_ir::Variances::from_iter(
|
||||||
&self.interner,
|
&self.interner,
|
||||||
variances.iter().map(|v| match v {
|
variances.iter().map(|v| match v {
|
||||||
ty::Variance::Invariant => chalk_ir::Variance::Invariant,
|
ty::Variance::Invariant => chalk_ir::Variance::Invariant,
|
||||||
|
@ -97,7 +97,6 @@ crate fn evaluate_goal<'tcx>(
|
|||||||
use chalk_solve::Solver;
|
use chalk_solve::Solver;
|
||||||
let mut solver = chalk_engine::solve::SLGSolver::new(32, None);
|
let mut solver = chalk_engine::solve::SLGSolver::new(32, None);
|
||||||
let db = ChalkRustIrDatabase { interner, reempty_placeholder };
|
let db = ChalkRustIrDatabase { interner, reempty_placeholder };
|
||||||
//dbg!("evaluate_goal_pre", &obligation, &lowered_goal);
|
|
||||||
let solution = solver.solve(&db, &lowered_goal);
|
let solution = solver.solve(&db, &lowered_goal);
|
||||||
debug!(?obligation, ?solution, "evaluate goal");
|
debug!(?obligation, ?solution, "evaluate goal");
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 5bb44f8b5b0aa105c8b22602e9b18800484afa21
|
Subproject commit e724bd826580ff95df48a8533af7dec1080693d4
|
@ -1 +1 @@
|
|||||||
Subproject commit ba34b8a968f9531d38c4dc4411d5568b7c076bfe
|
Subproject commit ceec19e873be87c6ee5666b030c6bb612f889a96
|
@ -1 +1 @@
|
|||||||
Subproject commit a5a48441d411f61556b57d762b03d6874afe575d
|
Subproject commit bbf06ad39d1f45654047e9596b750cc6e6d1b693
|
@ -1 +1 @@
|
|||||||
Subproject commit b278478b766178491a8b6f67afa4bcd6b64d977a
|
Subproject commit f02b09eb6e8af340ad1256a54adb7aae2ff3163e
|
@ -1 +1 @@
|
|||||||
Subproject commit 1cce0737d6a7d3ceafb139b4a206861fb1dcb2ab
|
Subproject commit f633769acef68574427a6fae6c06f13bc2199573
|
@ -1 +1 @@
|
|||||||
Subproject commit 8d78ad13896b955f630714f386a95ed91b237e3d
|
Subproject commit f9a8d70b6e0365ac2172ca6b7f1de0341297458d
|
@ -1,37 +0,0 @@
|
|||||||
// run-pass
|
|
||||||
// compile-flags: -Z verbose
|
|
||||||
|
|
||||||
#![allow(unused)]
|
|
||||||
#![feature(associated_type_bounds)]
|
|
||||||
|
|
||||||
pub trait Beta {
|
|
||||||
type Gamma;
|
|
||||||
}
|
|
||||||
|
|
||||||
pub trait Delta {
|
|
||||||
}
|
|
||||||
|
|
||||||
pub trait Epsilon<'e> {
|
|
||||||
type Zeta;
|
|
||||||
}
|
|
||||||
|
|
||||||
pub trait Eta {
|
|
||||||
}
|
|
||||||
|
|
||||||
fn where_bound_region_forall2<B>(beta: B) -> usize
|
|
||||||
where
|
|
||||||
B: Beta<Gamma: for<'a> Epsilon<'a, Zeta: Eta>>,
|
|
||||||
{
|
|
||||||
desugared_bound_region_forall2(beta)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn desugared_bound_region_forall2<B>(beta: B) -> usize
|
|
||||||
where
|
|
||||||
B: Beta,
|
|
||||||
B::Gamma: for<'a> Epsilon<'a>,
|
|
||||||
for<'a> <B::Gamma as Epsilon<'a>>::Zeta: Eta,
|
|
||||||
{
|
|
||||||
0
|
|
||||||
}
|
|
||||||
|
|
||||||
fn main() {}
|
|
@ -1 +1 @@
|
|||||||
Subproject commit 75d5d8cffe3464631f82dcd3c470b78dc1dda8bb
|
Subproject commit c3abcfe8a75901c7c701557a728941e8fb19399e
|
@ -1 +1 @@
|
|||||||
Subproject commit 2cf84baa5e3c55ac02f42919e67440acb5417125
|
Subproject commit 88a58d1f484af31d87b75e1d17655b59910f41fe
|
@ -1 +1 @@
|
|||||||
Subproject commit d66f476b4d5e7fdf1ec215c9ac16c923dc292324
|
Subproject commit 5254dbfd25d5284728ab624dca1969d61427a0db
|
@ -1 +1 @@
|
|||||||
Subproject commit acd94866fd0ff5eacb7e184ae21c19e5440fc5fb
|
Subproject commit ea268b9f559fbafcfc24f4982173b01dfad9e443
|
@ -8,7 +8,7 @@ const ALLOWED_SOURCES: &[&str] = &["\"registry+https://github.com/rust-lang/crat
|
|||||||
|
|
||||||
/// Checks for external package sources. `root` is the path to the directory that contains the
|
/// Checks for external package sources. `root` is the path to the directory that contains the
|
||||||
/// workspace `Cargo.toml`.
|
/// workspace `Cargo.toml`.
|
||||||
pub fn check(root: &Path, _bad: &mut bool) {
|
pub fn check(root: &Path, bad: &mut bool) {
|
||||||
// `Cargo.lock` of rust.
|
// `Cargo.lock` of rust.
|
||||||
let path = root.join("Cargo.lock");
|
let path = root.join("Cargo.lock");
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ pub fn check(root: &Path, _bad: &mut bool) {
|
|||||||
|
|
||||||
// Ensure source is allowed.
|
// Ensure source is allowed.
|
||||||
if !ALLOWED_SOURCES.contains(&&*source) {
|
if !ALLOWED_SOURCES.contains(&&*source) {
|
||||||
//tidy_error!(bad, "invalid source: {}", source);
|
tidy_error!(bad, "invalid source: {}", source);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user