-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove alt check #3101
Comments
There's also no equivalent syntax for |
Related #1679. I strongly favour this change. I argued with @gwillen about this a while ago; my stance was that the language should make it difficult rather than easy to do this sort of thing. I want a language that forces me to write I weakly favour |
@bblum I think I withdraw my defense of alt check. _ => fail is not really that much harder to write, and makes you explain yourself better. |
+1. |
+MAXINT |
I mentioned this to @brson already, but at least a dozen times I've either run into bugs that resulted from an We've tried having |
+1 on this change. |
+1 |
In the meeting we decided we had consensus to remove this. I volunteer to do so. (Graydon points out that with the macro system, it's easy for someone to write their own |
(I might try diving into macros myself to write a "do nothing in all omitted cases" macro and a "fail with a given message in all omitted cases" macro. How hard can it be?) |
The macro shouldn't be too hard, although you may have to duplicate most of the pattern syntax yourself. See the You might be able to get away with just using token trees rather than duplicating the pattern syntax too. |
I didn't end up doing the macros (could be added later), but otherwise, this is done: 5e22fb9 |
yessss |
Hooray! |
Simplify multi-lining binop exprs
Implement `llvm.x86.aesni.*` intrinsics
We want to run the proofs in the target crate and don't need to build (or run) the proofs in any of the host crates. This avoids a need to make available the `kani` crate to any such host crates. Resolves rust-lang#3101, rust-lang#3238
This is an unnecessary corner of the language, the only remaining use of the
check
keyword. I know I have misexplained the difference betweenalt
andalt check
before.alt check
is a bit of an anti-pattern because it:Which is clearer?
The first requires explaination. The second says exactly what the fallthrough behavior is, occurs syntactically where the fallthrough behavior occurs, and is more natural to write (once you've written all the cases you intend to cover you then write the fallthrough case instead of going back to the top of the structure and changing it).
The text was updated successfully, but these errors were encountered: