diff options
| author | Marijn Haverbeke <marijnh@gmail.com> | 2012-02-22 16:57:23 +0100 |
|---|---|---|
| committer | Marijn Haverbeke <marijnh@gmail.com> | 2012-02-22 16:57:23 +0100 |
| commit | cb2f43cbf4332ffe90b8963f1bdbaa85febe1b92 (patch) | |
| tree | a21b8f284989f9a3fc19fbbff8f971741b2b14d3 /src/comp/syntax | |
| parent | a3b655f8e3f1a9e84cd6dd4a1d1d2525d7fac7e7 (diff) | |
| download | rust-cb2f43cbf4332ffe90b8963f1bdbaa85febe1b92.tar.gz rust-cb2f43cbf4332ffe90b8963f1bdbaa85febe1b92.zip | |
Stop normalizing patterns
The check for whether a pat_ident is a variant or a binding is simple and fast. Normalizing patterns again and again is slow and error-prone (several places were forgetting to do it).
Diffstat (limited to 'src/comp/syntax')
| -rw-r--r-- | src/comp/syntax/ast.rs | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/comp/syntax/ast.rs b/src/comp/syntax/ast.rs index a76b6f9919f..262eac3ca01 100644 --- a/src/comp/syntax/ast.rs +++ b/src/comp/syntax/ast.rs @@ -108,9 +108,6 @@ enum pat_ { // which it is. The resolver determines this, and // records this pattern's node_id in an auxiliary // set (of "pat_idents that refer to nullary enums") - // After the resolution phase, code should never pattern- - // match on a pat directly! Always call pat_util::normalize_pat -- - // it turns any pat_idents that refer to nullary enums into pat_enums. pat_ident(@path, option<@pat>), pat_enum(@path, [@pat]), pat_rec([field_pat], bool), |
