-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename TyData to TyKind #628
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple nits, but then r=me
book/src/types/rust_types.md
Outdated
@@ -165,13 +165,13 @@ other type without any effect, and so forth. | |||
|
|||
## Mapping to rustc types | |||
|
|||
The rustc [`TyKind`] enum has a lot more variants than chalk. This | |||
The rustc [`TyVariableKind`] enum has a lot more variants than chalk. This |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should stay as TyKind
, so just s/TyVariableKind/TyKind in the book (should fix the link too)
chalk-ir/src/lib.rs
Outdated
pub fn inference_var(&self, interner: &I) -> Option<InferenceVar> { | ||
if let TyData::InferenceVar(depth, _) = self.data(interner) { | ||
if let TyKind::InferenceVar(depth, _) = &self.data(interner).kind { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.data(interner).kind
-> self.kind(interner)
here and in the rest of chalk-ir
chalk-ir/src/lib.rs
Outdated
@@ -2431,8 +2447,8 @@ impl<I: Interner> Substitution<I> { | |||
self.iter(interner).zip(0..).all(|(generic_arg, index)| { | |||
let index_db = BoundVar::new(DebruijnIndex::INNERMOST, index); | |||
match generic_arg.data(interner) { | |||
GenericArgData::Ty(ty) => match ty.data(interner) { | |||
TyData::BoundVar(depth) => index_db == *depth, | |||
GenericArgData::Ty(ty) => match &ty.data(interner).kind { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ty.data(interner).kind
-> ty.kind(interner
@bors r=nathanwhit |
📌 Commit 21b44ab has been approved by |
☀️ Test successful - checks-actions |
Part of #627