Make `ConstraintSynthesizer::generate_constraints` not consume `self` by value
Pratyush opened this issue · 5 comments
Pratyush commented
Make `ConstraintSynthesizer::generate_constraints` not consume `self` by value
weikengchen commented
Does it mean that we just change self
to &self
?
My first attempt shows that this seems good: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=0dcc9126df1c78347ad34fc5238617a4
Pratyush commented
yeah, it's mostly just an issue with updating everything downstream =)
Pratyush commented
@weikengchen Now that cloning ConstraintSystemRef
is cheap, is this still an issue?
weikengchen commented
Nope? Because the one that may need cloning is ConstraintSynthesizer
rather than ConstraintSystemRef
.
Pratyush commented
Oh oops, misread the title lol. Ok, will address this in my current set of changes.