Skip to content

Commit 61b2a6f

Browse files
committed
Update chalk to 0.26.0
1 parent ed78402 commit 61b2a6f

File tree

5 files changed

+29
-24
lines changed

5 files changed

+29
-24
lines changed

Cargo.lock

+8-8
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,9 @@ dependencies = [
427427

428428
[[package]]
429429
name = "chalk-derive"
430-
version = "0.25.0"
430+
version = "0.26.0"
431431
source = "registry+https://github.com/rust-lang/crates.io-index"
432-
checksum = "624e14d3f029186e6ffd97081ffa082f98ddd5df20655b6f0e8efb83dd8ac8b4"
432+
checksum = "72aade21de1aa12a31fc287ec9891915965b6d7caac1c5de5ea095b6b9bc4cc4"
433433
dependencies = [
434434
"proc-macro2",
435435
"quote",
@@ -439,9 +439,9 @@ dependencies = [
439439

440440
[[package]]
441441
name = "chalk-engine"
442-
version = "0.25.0"
442+
version = "0.26.0"
443443
source = "registry+https://github.com/rust-lang/crates.io-index"
444-
checksum = "fd172df00ff1de4789ed8971e1623afb10551041a9385d3b4e22fe6b1e8a0d1d"
444+
checksum = "fcffc1240cc5f9c5d1d8028d35a293e193a647a71244d51d3d5b4295cbea0593"
445445
dependencies = [
446446
"chalk-derive",
447447
"chalk-ir",
@@ -452,19 +452,19 @@ dependencies = [
452452

453453
[[package]]
454454
name = "chalk-ir"
455-
version = "0.25.0"
455+
version = "0.26.0"
456456
source = "registry+https://github.com/rust-lang/crates.io-index"
457-
checksum = "118c68eccdda5604af50bbef84c94550f3854f76989cb03c36ffd36cc2ffe958"
457+
checksum = "6b856e69b664ca362a30c21f477fe10f59f74458978bc9bfd667820549bc7758"
458458
dependencies = [
459459
"chalk-derive",
460460
"lazy_static",
461461
]
462462

463463
[[package]]
464464
name = "chalk-solve"
465-
version = "0.25.0"
465+
version = "0.26.0"
466466
source = "registry+https://github.com/rust-lang/crates.io-index"
467-
checksum = "45b235a1f568b28707f117b2d30eabbee9cbcfccaa0d6e9697300400c8ca0996"
467+
checksum = "abae2ca9cca3b0a2f33fe946a688881a8b17b8edc088fe3820cb770275e965ed"
468468
dependencies = [
469469
"chalk-derive",
470470
"chalk-ir",

compiler/rustc_middle/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ rustc_index = { path = "../rustc_index" }
2626
rustc_serialize = { path = "../rustc_serialize" }
2727
rustc_ast = { path = "../rustc_ast" }
2828
rustc_span = { path = "../rustc_span" }
29-
chalk-ir = "0.25.0"
29+
chalk-ir = "0.26.0"
3030
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
3131
measureme = "0.7.1"
3232
rustc_session = { path = "../rustc_session" }

compiler/rustc_traits/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ rustc_hir = { path = "../rustc_hir" }
1212
rustc_index = { path = "../rustc_index" }
1313
rustc_ast = { path = "../rustc_ast" }
1414
rustc_span = { path = "../rustc_span" }
15-
chalk-ir = "0.25.0"
16-
chalk-solve = "0.25.0"
17-
chalk-engine = "0.25.0"
15+
chalk-ir = "0.26.0"
16+
chalk-solve = "0.26.0"
17+
chalk-engine = "0.26.0"
1818
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
1919
rustc_infer = { path = "../rustc_infer" }
2020
rustc_trait_selection = { path = "../rustc_trait_selection" }

compiler/rustc_traits/src/chalk/db.rs

+8-6
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ use rustc_middle::ty::subst::{InternalSubsts, Subst, SubstsRef};
1111
use rustc_middle::ty::{self, AssocItemContainer, AssocKind, TyCtxt, TypeFoldable};
1212

1313
use rustc_hir::def_id::DefId;
14-
use rustc_hir::Unsafety;
1514

1615
use rustc_span::symbol::sym;
1716

1817
use std::fmt;
1918
use std::sync::Arc;
2019

2120
use crate::chalk::lowering::{self, LowerInto};
21+
use rustc_hir::Unsafety;
2222

2323
pub struct RustIrDatabase<'tcx> {
2424
pub(crate) interner: RustInterner<'tcx>,
@@ -247,12 +247,14 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
247247
};
248248
Arc::new(chalk_solve::rust_ir::FnDefDatum {
249249
id: fn_def_id,
250-
abi: sig.abi(),
251-
safety: match sig.unsafety() {
252-
Unsafety::Normal => chalk_ir::Safety::Safe,
253-
Unsafety::Unsafe => chalk_ir::Safety::Unsafe,
250+
sig: chalk_ir::FnSig {
251+
abi: sig.abi(),
252+
safety: match sig.unsafety() {
253+
Unsafety::Normal => chalk_ir::Safety::Safe,
254+
Unsafety::Unsafe => chalk_ir::Safety::Unsafe,
255+
},
256+
variadic: sig.c_variadic(),
254257
},
255-
variadic: sig.c_variadic(),
256258
binders: chalk_ir::Binders::new(binders, bound),
257259
})
258260
}

compiler/rustc_traits/src/chalk/lowering.rs

+9-6
Original file line numberDiff line numberDiff line change
@@ -340,18 +340,20 @@ impl<'tcx> LowerInto<'tcx, chalk_ir::Ty<RustInterner<'tcx>>> for Ty<'tcx> {
340340
collect_bound_vars(interner, interner.tcx, &sig.inputs_and_output());
341341
TyData::Function(chalk_ir::FnPointer {
342342
num_binders: binders.len(interner),
343+
sig: chalk_ir::FnSig {
344+
abi: sig.abi(),
345+
safety: match sig.unsafety() {
346+
rustc_hir::Unsafety::Normal => chalk_ir::Safety::Safe,
347+
rustc_hir::Unsafety::Unsafe => chalk_ir::Safety::Unsafe,
348+
},
349+
variadic: sig.c_variadic(),
350+
},
343351
substitution: chalk_ir::Substitution::from_iter(
344352
interner,
345353
inputs_and_outputs.iter().map(|ty| {
346354
chalk_ir::GenericArgData::Ty(ty.lower_into(interner)).intern(interner)
347355
}),
348356
),
349-
abi: sig.abi(),
350-
safety: match sig.unsafety() {
351-
rustc_hir::Unsafety::Normal => chalk_ir::Safety::Safe,
352-
rustc_hir::Unsafety::Unsafe => chalk_ir::Safety::Unsafe,
353-
},
354-
variadic: sig.c_variadic(),
355357
})
356358
.intern(interner)
357359
}
@@ -480,6 +482,7 @@ impl<'tcx> LowerInto<'tcx, Ty<'tcx>> for &chalk_ir::Ty<RustInterner<'tcx>> {
480482
substs: application_ty.substitution.lower_into(interner),
481483
item_def_id: assoc_ty.0,
482484
}),
485+
chalk_ir::TypeName::Foreign(def_id) => ty::Foreign(def_id.0),
483486
chalk_ir::TypeName::Error => unimplemented!(),
484487
},
485488
TyData::Placeholder(placeholder) => ty::Placeholder(ty::Placeholder {

0 commit comments

Comments
 (0)