-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for patterns referencing non-trivial statics
This is accomplished by rewriting static expressions into equivalent patterns. This way, patterns referencing static variables can both participate in exhaustiveness analysis as well as be compiled down into the appropriate branch of the decision trees that match expressions are codegened to. Fixes #6533. Fixes #13626. Fixes #13731. Fixes #14576. Fixes #15393.
- Loading branch information
Jakub Wieczorek
committed
Jul 18, 2014
1 parent
7502b4c
commit fba1194
Showing
9 changed files
with
489 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
fba1194
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from pcwalton
at https://github.com/jakub-/rust/commit/fba1194841fd8f31c3b93315b2cb53d1ce87fe98
fba1194
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging jakub-/rust/patterns-statics = fba1194 into auto
fba1194
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jakub-/rust/patterns-statics = fba1194 merged ok, testing candidate = 5e3b81cd
fba1194
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some tests failed:
failure: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/406
exception: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/402
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/403
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/402
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/403
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/405
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/406
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/405
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/411
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/406
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/405
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/408
exception: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/406
exception: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/407
fba1194
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from pcwalton
at https://github.com/jakub-/rust/commit/fba1194841fd8f31c3b93315b2cb53d1ce87fe98
fba1194
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging jakub-/rust/patterns-statics = fba1194 into auto
fba1194
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jakub-/rust/patterns-statics = fba1194 merged ok, testing candidate = 8672a23
fba1194
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/419
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/419
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/418
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/419
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/421
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/422
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/421
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/427
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/422
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/421
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/424
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/422
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/422
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/423
fba1194
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = 8672a23