Skip to content
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

Move hir_ty to Chalk IR #8419

Merged
merged 18 commits into from
Apr 8, 2021
Merged

Move hir_ty to Chalk IR #8419

merged 18 commits into from
Apr 8, 2021

Conversation

flodiebold
Copy link
Member

@flodiebold flodiebold commented Apr 8, 2021

Closes #8313.

There's some further cleanups to do:

  • we're still using our TypeWalk in lots of places (not for mutating/folding though, just for walking)
  • we're still using our own canonicalization and unification and our InferenceTable
  • ToChalk still exists and gets called, it's just the identity in most cases now (I'll probably clean those up before merging this)

@@ -741,7 +745,7 @@ fn write_bounds_like_dyn_trait(
if !first {
write!(f, " + ")?;
}
// We assume that the self type is $0 (i.e. the
// We assume that the self type is (i.e. the
Copy link
Member Author

Choose a reason for hiding this comment

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

o_O... I think that may have been the result of applying a code action? if there's a $0 in code, do we just let it get treated as a snippet marker?

Copy link
Member

Choose a reason for hiding this comment

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

yup, we don't do escaping.

🤔 👿 I wonder if we can bypass the whole issue by using some unicode private range character internaly for $, and do escaping in the to_proto?

Now that we're using Chalk's `substitute` which actually knows about
lifetimes, the hack doesn't work anymore, but we can put in a proper
lifetime.
@flodiebold
Copy link
Member Author

changelog internal Type inference now uses Chalk's types everywhere, instead of having its own representations and mapping between them

@flodiebold
Copy link
Member Author

bors r+

@bors
Copy link
Contributor

bors bot commented Apr 8, 2021

@bors bors bot merged commit 72ad5cb into rust-lang:master Apr 8, 2021
@flodiebold flodiebold deleted the chalk-ir-move branch April 8, 2021 15:17
@lnicola
Copy link
Member

lnicola commented Apr 8, 2021

987 MB -> 1018 MB RAM on self.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracking issue: Move to Chalk IR
3 participants