Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions crates/hir_ty/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ ena = "0.14.0"
log = "0.4.8"
rustc-hash = "1.1.0"
scoped-tls = "1"
chalk-solve = { version = "0.43", default-features = false }
chalk-ir = "0.43"
chalk-recursive = "0.43"
chalk-solve = { version = "0.45", default-features = false }
chalk-ir = "0.45"
chalk-recursive = "0.45"

stdx = { path = "../stdx", version = "0.0.0" }
hir_def = { path = "../hir_def", version = "0.0.0" }
Expand Down
11 changes: 9 additions & 2 deletions crates/hir_ty/src/traits/chalk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,13 @@ impl<'a> chalk_solve::RustIrDatabase<Interner> for ChalkContext<'a> {
fn adt_datum(&self, struct_id: AdtId) -> Arc<StructDatum> {
self.db.struct_datum(self.krate, struct_id)
}
fn adt_repr(&self, _struct_id: AdtId) -> rust_ir::AdtRepr {
rust_ir::AdtRepr { repr_c: false, repr_packed: false }
fn adt_repr(&self, _struct_id: AdtId) -> Arc<rust_ir::AdtRepr<Interner>> {
// FIXME: keep track of these
Arc::new(rust_ir::AdtRepr { c: false, packed: false, int: None })
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we already remember the packedness, but I got a bit lost trying to retrieve it.

}
fn discriminant_type(&self, _ty: chalk_ir::Ty<Interner>) -> chalk_ir::Ty<Interner> {
// FIXME: keep track of this
chalk_ir::TyKind::Scalar(chalk_ir::Scalar::Uint(chalk_ir::UintTy::U32)).intern(&Interner)
}
fn impl_datum(&self, impl_id: ImplId) -> Arc<ImplDatum> {
self.db.impl_datum(self.krate, impl_id)
Expand Down Expand Up @@ -457,6 +462,7 @@ fn well_known_trait_from_lang_attr(name: &str) -> Option<WellKnownTrait> {
"fn" => WellKnownTrait::Fn,
"unsize" => WellKnownTrait::Unsize,
"coerce_unsized" => WellKnownTrait::CoerceUnsized,
"discriminant_kind" => WellKnownTrait::DiscriminantKind,
_ => return None,
})
}
Expand All @@ -473,6 +479,7 @@ fn lang_attr_from_well_known_trait(attr: WellKnownTrait) -> &'static str {
WellKnownTrait::Unsize => "unsize",
WellKnownTrait::Unpin => "unpin",
WellKnownTrait::CoerceUnsized => "coerce_unsized",
WellKnownTrait::DiscriminantKind => "discriminant_kind",
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/syntax/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ doctest = false
[dependencies]
itertools = "0.9.0"
rowan = "0.10.0"
rustc_lexer = { version = "691.0.0", package = "rustc-ap-rustc_lexer" }
rustc_lexer = { version = "695.0.0", package = "rustc-ap-rustc_lexer" }
rustc-hash = "1.1.0"
arrayvec = "0.5.1"
once_cell = "1.3.1"
Expand Down