about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2014-09-16 15:24:56 +0200
committerFelix S. Klock II <pnkfelix@pnkfx.org>2014-11-25 15:26:16 +0100
commit09d67fd777be1a0ab751007e6787add2b927909f (patch)
treebb15e5fb57338732c4f5b77fa344a81801018967 /src/rustllvm/RustWrapper.cpp
parent6f7cb8c6185878d6e4ad0cf354652158a73c0b72 (diff)
downloadrust-09d67fd777be1a0ab751007e6787add2b927909f.tar.gz
rust-09d67fd777be1a0ab751007e6787add2b927909f.zip
Track what drop obligations are established on match arms.
This is accomplished by:

1. Add `MatchMode` enum to `expr_use_visitor`.

2. Computing the match mode for each pattern via a pre-pass, and then
   passing the mode along when visiting the pattern in
   expr_use_visitor.

3. Adding a `fn matched_pat` callback to expr_use_visitor, which is
   called on interior struct and enum nodes of the pattern (as opposed
   to `fn consume_pat`, which is only invoked for identifiers at the
   leaves of the pattern), and invoking it accordingly.

Of particular interest are the `cat_downcast` instances established
when matching enum variants.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions