News for hackers. Stuff that matters.
Re:Announcing Rust 1.28 by monocasa on Thursday August 02, 2018 @01:21PM (#17673375)
Is NonZero* special cased by the language? If for instance, I had a preexisting binary interface where 0 through (2^n - 2) is valid, but all bits set is the invalid case, can I explain that to the compiler as well?
Re:Announcing Rust 1.28 by steveklabnik on Thursday August 02, 2018 @01:24PM (#17673414)
Yes, it is. The case you're talking about is pertinent to the above discussion on why it's NonZero* vs NonZero<T>; you cannot currently inform the compiler in your case.