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
Replying to @fanf
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
Replying to @fanf
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