Better error messages at compile time
I just tried to write the following contract (from #7 (closed)):
#[contracts::post(!ret.lval)]
#[contracts::post(old(!self.lval) ==> old(self.clone()) == ret)]
pub(super) fn rval(self) -> Self {
unimplemented!();
}
I got the following error message:
error: expected expression
error: aborting due to previous error
error: could not compile `rcc`.
This is so vague as to almost be useless. It doesn't have the span, line, or even file name. Additionally, expected expression
doesn't really tell me anything other than 'there was an error'.
Edited by Jynn Nelson