Skip to content

Commit

Permalink
Auto merge of #92167 - pierwill:chalk-update, r=jackh726
Browse files Browse the repository at this point in the history
Update chalk to 0.75.0

- Compute flags in `intern_ty`
- Remove `tracing-serde` from `PERMITTED_DEPENDENCIES`
- Bump `tracing-tree` to 0.2.0
- Bump `tracing-subscriber` to 0.3.3
  • Loading branch information
bors committed Dec 23, 2021
2 parents 390bb34 + 155a4a8 commit c1d301b
Show file tree
Hide file tree
Showing 11 changed files with 140 additions and 154 deletions.
51 changes: 18 additions & 33 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"

[[package]]
name = "chalk-derive"
version = "0.55.0"
version = "0.75.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3983193cacd81f0f924acb666b7fe5e1a0d81db9f113fa69203eda7ea8ce8b6c"
checksum = "d54e3b5f9e3425e6b119ff07568d8d006bfa5a8d6f78a9cbc3530b1e962e316c"
dependencies = [
"proc-macro2",
"quote",
Expand All @@ -504,9 +504,9 @@ dependencies = [

[[package]]
name = "chalk-engine"
version = "0.55.0"
version = "0.75.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05a171ce5abbf0fbd06f221ab80ab182c7ef78603d23b858bc44e7ce8a86a396"
checksum = "bdc891073396b167163db77123b0a3c00088edc00466cecc5531f33e3e989523"
dependencies = [
"chalk-derive",
"chalk-ir",
Expand All @@ -517,9 +517,9 @@ dependencies = [

[[package]]
name = "chalk-ir"
version = "0.55.0"
version = "0.75.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a522f53af971e7678f472d687e053120157b3ae26e2ebd5ecbc0f5ab124f2cb6"
checksum = "2b79e5a1d04b79311e90c69356a2c62027853906a7e33b3e070b93c055fc3e8a"
dependencies = [
"bitflags",
"chalk-derive",
Expand All @@ -528,14 +528,14 @@ dependencies = [

[[package]]
name = "chalk-solve"
version = "0.55.0"
version = "0.75.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cdf79fb77a567e456a170f7ec84ea6584163d4ba3f13660cd182013d34ca667c"
checksum = "a5d2a1db6605aba70a58820bd80ac422b218913a510f1a40beef9efc5371ea1d"
dependencies = [
"chalk-derive",
"chalk-ir",
"ena",
"itertools 0.9.0",
"itertools 0.10.1",
"petgraph",
"rustc-hash",
"tracing",
Expand Down Expand Up @@ -2107,9 +2107,9 @@ dependencies = [

[[package]]
name = "matchers"
version = "0.0.1"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1"
checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"
dependencies = [
"regex-automata",
]
Expand Down Expand Up @@ -5122,9 +5122,9 @@ dependencies = [

[[package]]
name = "synstructure"
version = "0.12.4"
version = "0.12.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701"
checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f"
dependencies = [
"proc-macro2",
"quote",
Expand Down Expand Up @@ -5447,49 +5447,34 @@ dependencies = [
"tracing-core",
]

[[package]]
name = "tracing-serde"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb65ea441fbb84f9f6748fd496cf7f63ec9af5bca94dd86456978d055e8eb28b"
dependencies = [
"serde",
"tracing-core",
]

[[package]]
name = "tracing-subscriber"
version = "0.2.16"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ab8966ac3ca27126141f7999361cc97dd6fb4b71da04c02044fa9045d98bb96"
checksum = "245da694cc7fc4729f3f418b304cb57789f1bed2a78c575407ab8a23f53cb4d3"
dependencies = [
"ansi_term 0.12.1",
"chrono",
"lazy_static",
"matchers",
"parking_lot",
"regex",
"serde",
"serde_json",
"sharded-slab",
"smallvec",
"thread_local",
"tracing",
"tracing-core",
"tracing-log",
"tracing-serde",
]

[[package]]
name = "tracing-tree"
version = "0.1.9"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1712b40907f8d9bc2bc66763ab61dec914b7123d7149e59feb0d4e2a95fc4967"
checksum = "3ce989c9962c7f61fe084dd4a230eec784649dfc2392467c790007c3a6e134e7"
dependencies = [
"ansi_term 0.12.1",
"atty",
"termcolor",
"tracing",
"tracing-core",
"tracing-log",
"tracing-subscriber",
]
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_driver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ crate-type = ["dylib"]
libc = "0.2"
atty = "0.2"
tracing = { version = "0.1.28" }
tracing-subscriber = { version = "0.2.16", default-features = false, features = ["fmt", "env-filter", "smallvec", "parking_lot", "ansi"] }
tracing-tree = "0.1.9"
tracing-subscriber = { version = "0.3.3", default-features = false, features = ["fmt", "env-filter", "smallvec", "parking_lot", "ansi"] }
tracing-tree = "0.2.0"
rustc_middle = { path = "../rustc_middle" }
rustc_ast_pretty = { path = "../rustc_ast_pretty" }
rustc_target = { path = "../rustc_target" }
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ rustc_index = { path = "../rustc_index" }
rustc_serialize = { path = "../rustc_serialize" }
rustc_ast = { path = "../rustc_ast" }
rustc_span = { path = "../rustc_span" }
chalk-ir = "0.55.0"
chalk-ir = "0.75.0"
smallvec = { version = "1.6.1", features = ["union", "may_dangle"] }
rustc_session = { path = "../rustc_session" }
rustc_type_ir = { path = "../rustc_type_ir" }
Expand Down
61 changes: 31 additions & 30 deletions compiler/rustc_middle/src/traits/chalk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,179 +206,180 @@ impl<'tcx> chalk_ir::interner::Interner for RustInterner<'tcx> {
Some(write!(fmt, "{:?}", opaque_ty.opaque_ty_id))
}

fn intern_ty(&self, ty: chalk_ir::TyData<Self>) -> Self::InternedType {
Box::new(ty)
fn intern_ty(self, ty: chalk_ir::TyKind<Self>) -> Self::InternedType {
let flags = ty.compute_flags(self);
Box::new(chalk_ir::TyData { kind: ty, flags: flags })
}

fn ty_data<'a>(&self, ty: &'a Self::InternedType) -> &'a chalk_ir::TyData<Self> {
fn ty_data<'a>(self, ty: &'a Self::InternedType) -> &'a chalk_ir::TyData<Self> {
ty
}

fn intern_lifetime(&self, lifetime: chalk_ir::LifetimeData<Self>) -> Self::InternedLifetime {
fn intern_lifetime(self, lifetime: chalk_ir::LifetimeData<Self>) -> Self::InternedLifetime {
Box::new(lifetime)
}

fn lifetime_data<'a>(
&self,
self,
lifetime: &'a Self::InternedLifetime,
) -> &'a chalk_ir::LifetimeData<Self> {
&lifetime
}

fn intern_const(&self, constant: chalk_ir::ConstData<Self>) -> Self::InternedConst {
fn intern_const(self, constant: chalk_ir::ConstData<Self>) -> Self::InternedConst {
Box::new(constant)
}

fn const_data<'a>(&self, constant: &'a Self::InternedConst) -> &'a chalk_ir::ConstData<Self> {
fn const_data<'a>(self, constant: &'a Self::InternedConst) -> &'a chalk_ir::ConstData<Self> {
&constant
}

fn const_eq(
&self,
self,
_ty: &Self::InternedType,
c1: &Self::InternedConcreteConst,
c2: &Self::InternedConcreteConst,
) -> bool {
c1 == c2
}

fn intern_generic_arg(&self, data: chalk_ir::GenericArgData<Self>) -> Self::InternedGenericArg {
fn intern_generic_arg(self, data: chalk_ir::GenericArgData<Self>) -> Self::InternedGenericArg {
Box::new(data)
}

fn generic_arg_data<'a>(
&self,
self,
data: &'a Self::InternedGenericArg,
) -> &'a chalk_ir::GenericArgData<Self> {
&data
}

fn intern_goal(&self, goal: chalk_ir::GoalData<Self>) -> Self::InternedGoal {
fn intern_goal(self, goal: chalk_ir::GoalData<Self>) -> Self::InternedGoal {
Box::new(goal)
}

fn goal_data<'a>(&self, goal: &'a Self::InternedGoal) -> &'a chalk_ir::GoalData<Self> {
fn goal_data<'a>(self, goal: &'a Self::InternedGoal) -> &'a chalk_ir::GoalData<Self> {
&goal
}

fn intern_goals<E>(
&self,
self,
data: impl IntoIterator<Item = Result<chalk_ir::Goal<Self>, E>>,
) -> Result<Self::InternedGoals, E> {
data.into_iter().collect::<Result<Vec<_>, _>>()
}

fn goals_data<'a>(&self, goals: &'a Self::InternedGoals) -> &'a [chalk_ir::Goal<Self>] {
fn goals_data<'a>(self, goals: &'a Self::InternedGoals) -> &'a [chalk_ir::Goal<Self>] {
goals
}

fn intern_substitution<E>(
&self,
self,
data: impl IntoIterator<Item = Result<chalk_ir::GenericArg<Self>, E>>,
) -> Result<Self::InternedSubstitution, E> {
data.into_iter().collect::<Result<Vec<_>, _>>()
}

fn substitution_data<'a>(
&self,
self,
substitution: &'a Self::InternedSubstitution,
) -> &'a [chalk_ir::GenericArg<Self>] {
substitution
}

fn intern_program_clause(
&self,
self,
data: chalk_ir::ProgramClauseData<Self>,
) -> Self::InternedProgramClause {
Box::new(data)
}

fn program_clause_data<'a>(
&self,
self,
clause: &'a Self::InternedProgramClause,
) -> &'a chalk_ir::ProgramClauseData<Self> {
&clause
}

fn intern_program_clauses<E>(
&self,
self,
data: impl IntoIterator<Item = Result<chalk_ir::ProgramClause<Self>, E>>,
) -> Result<Self::InternedProgramClauses, E> {
data.into_iter().collect::<Result<Vec<_>, _>>()
}

fn program_clauses_data<'a>(
&self,
self,
clauses: &'a Self::InternedProgramClauses,
) -> &'a [chalk_ir::ProgramClause<Self>] {
clauses
}

fn intern_quantified_where_clauses<E>(
&self,
self,
data: impl IntoIterator<Item = Result<chalk_ir::QuantifiedWhereClause<Self>, E>>,
) -> Result<Self::InternedQuantifiedWhereClauses, E> {
data.into_iter().collect::<Result<Vec<_>, _>>()
}

fn quantified_where_clauses_data<'a>(
&self,
self,
clauses: &'a Self::InternedQuantifiedWhereClauses,
) -> &'a [chalk_ir::QuantifiedWhereClause<Self>] {
clauses
}

fn intern_generic_arg_kinds<E>(
&self,
self,
data: impl IntoIterator<Item = Result<chalk_ir::VariableKind<Self>, E>>,
) -> Result<Self::InternedVariableKinds, E> {
data.into_iter().collect::<Result<Vec<_>, _>>()
}

fn variable_kinds_data<'a>(
&self,
self,
parameter_kinds: &'a Self::InternedVariableKinds,
) -> &'a [chalk_ir::VariableKind<Self>] {
parameter_kinds
}

fn intern_canonical_var_kinds<E>(
&self,
self,
data: impl IntoIterator<Item = Result<chalk_ir::CanonicalVarKind<Self>, E>>,
) -> Result<Self::InternedCanonicalVarKinds, E> {
data.into_iter().collect::<Result<Vec<_>, _>>()
}

fn canonical_var_kinds_data<'a>(
&self,
self,
canonical_var_kinds: &'a Self::InternedCanonicalVarKinds,
) -> &'a [chalk_ir::CanonicalVarKind<Self>] {
canonical_var_kinds
}

fn intern_constraints<E>(
&self,
self,
data: impl IntoIterator<Item = Result<chalk_ir::InEnvironment<chalk_ir::Constraint<Self>>, E>>,
) -> Result<Self::InternedConstraints, E> {
data.into_iter().collect::<Result<Vec<_>, _>>()
}

fn constraints_data<'a>(
&self,
self,
constraints: &'a Self::InternedConstraints,
) -> &'a [chalk_ir::InEnvironment<chalk_ir::Constraint<Self>>] {
constraints
}

fn intern_variances<E>(
&self,
self,
data: impl IntoIterator<Item = Result<chalk_ir::Variance, E>>,
) -> Result<Self::InternedVariances, E> {
data.into_iter().collect::<Result<Vec<_>, _>>()
}

fn variances_data<'a>(
&self,
self,
variances: &'a Self::InternedVariances,
) -> &'a [chalk_ir::Variance] {
variances
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_traits/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.55.0"
chalk-solve = "0.55.0"
chalk-engine = "0.55.0"
chalk-ir = "0.75.0"
chalk-engine = "0.75.0"
chalk-solve = "0.75.0"
smallvec = { version = "1.6.1", features = ["union", "may_dangle"] }
rustc_infer = { path = "../rustc_infer" }
rustc_trait_selection = { path = "../rustc_trait_selection" }
Loading

0 comments on commit c1d301b

Please sign in to comment.