snark icon indicating copy to clipboard operation
snark copied to clipboard

Make `ConstraintSynthesizer::generate_constraints` not consume `self` by value

Open Pratyush opened this issue 5 years ago • 5 comments

Pratyush avatar Oct 26 '20 22:10 Pratyush

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

weikengchen avatar Oct 26 '20 22:10 weikengchen

yeah, it's mostly just an issue with updating everything downstream =)

Pratyush avatar Oct 26 '20 23:10 Pratyush

@weikengchen Now that cloning ConstraintSystemRef is cheap, is this still an issue?

Pratyush avatar Apr 19 '21 18:04 Pratyush

Nope? Because the one that may need cloning is ConstraintSynthesizer rather than ConstraintSystemRef.

weikengchen avatar Apr 19 '21 19:04 weikengchen

Oh oops, misread the title lol. Ok, will address this in my current set of changes.

Pratyush avatar Apr 19 '21 19:04 Pratyush