hmm, iβm trying to get rust to track in the type system whether a number is known to be zero, but itβs failing in a confusing way: rustc says thereβs no implementation of Op for Added<Sa,Sb> but how can it be so sure when Sa and Sb are unknown type parameters?
2
1
er, good idea, heh play.rust-lang.org/?version=β¦
weirdly the playground gives me a different error
It's a lot easier to try and grok what's going on if you use play.rust-lang.org rather than tiny screenshots :D
2
2
If you give it some more bounds on your impl Add then it'll get further (this is not sufficient):
Added<Sa,Sb>: Op,
Added<Va,Vb>: Op,
Added<PSa, PSb>: Op,
Nov 30, 2020 Β· 2:17 PM UTC



