You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As described in #1939, we want to be able to provide an optional assert message to be displayed in the situation where a constraint is unsatisfied.
assert is in the process of being changed into a built-in function, we then need to be able to have two version of assert_eq both with and without the assert message.
Happy Case
Ideally we'd be able to have an optional argument to assert_eq as so
We could also simply not convert assert_eq into a builtin function and keep it as a keyword. Supporting an optional extra message argument is the reason assert is still a keyword for example.
Changed to P-LOW due to this being a nice to have if we have it as a keyword. The thing that Rust has that we don't which makes it possible in Rust without optional arguments is macro_rules
Problem
As described in #1939, we want to be able to provide an optional assert message to be displayed in the situation where a constraint is unsatisfied.
assert
is in the process of being changed into a built-in function, we then need to be able to have two version ofassert_eq
both with and without the assert message.Happy Case
Ideally we'd be able to have an optional argument to
assert_eq
as soAlternatives Considered
We could also allow shadowing of a function name as long as the signature was different.
Additional Context
No response
Would you like to submit a PR for this Issue?
No
Support Needs
No response
The text was updated successfully, but these errors were encountered: