-
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
Or-pattern example causes Internal Compiler Error #68785
Comments
|
@matthewjasper You might want to throw this into your PR (#67668) as a test case. |
Would appreciate clarification here: I don't believe pattern binding with or-patterns within function arguments ( However, it's semantically valid code, and can be used as a contrived example to demonstrate exhaustive pattern matching. Which is how I found this ICE in the first place. |
@cr1901 It's semantically equivalent, but it results in different code-paths in the compiler. I'm quite sure that #67668 will fix this though as it seems more or less like a dupe of #67514 (but different enough that a test case should maybe be added). The MIR parts of or-patterns have simply not been implemented yet, but we're pretty close. |
Rollup of 9 pull requests Successful merges: - #68691 (Remove `RefCell` usage from `ObligationForest`.) - #68751 (Implement `unused_parens` for `const` and `static` items) - #68788 (Towards unified `fn` grammar) - #68837 (Make associated item collection a query) - #68842 (or_patterns: add regression test for #68785) - #68844 (use def_path_str for missing_debug_impls message) - #68845 (stop using BytePos for computing spans in librustc_parse/parser/mod.rs) - #68869 (clean up E0271 explanation) - #68880 (Forbid using `0` as issue number) Failed merges: r? @ghost
Code
The following code snippet demonstrating or-patterns crashes the nightly compiler on the Playground as of 2-2-2020.
(Playground)
Error
Other Information
I understand that or-patterns are incomplete feature, thus errors are expected. But I was told to report this anyway (cc: @estebank).
It's not convenient for me to test locally right now; is it possible to get a backtrace on the Playground?
The text was updated successfully, but these errors were encountered: