diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2012-06-07 21:53:47 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2012-06-07 21:53:47 -0700 |
| commit | 26faa37305f59e2b09a92b089b78abc4f01da8e8 (patch) | |
| tree | 68f2618785f4b7fbe324f4ae9839e3c57b2fedd1 /src/libsyntax/parse/common.rs | |
| parent | 847c5e4e9892ef56873ac52a552997267c4d385a (diff) | |
| download | rust-26faa37305f59e2b09a92b089b78abc4f01da8e8.tar.gz rust-26faa37305f59e2b09a92b089b78abc4f01da8e8.zip | |
syntax: Add a lot of copy keywords
Diffstat (limited to 'src/libsyntax/parse/common.rs')
| -rw-r--r-- | src/libsyntax/parse/common.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libsyntax/parse/common.rs b/src/libsyntax/parse/common.rs index 35afb79ce63..c0a2f9b9e6e 100644 --- a/src/libsyntax/parse/common.rs +++ b/src/libsyntax/parse/common.rs @@ -209,6 +209,9 @@ impl parser_common for parser { ret v; } + // FIXME: A lot of callers go through here, only to copy out the T and + // discard the spanned<> wrapper. I feel as though there should be a + // version of this that does not return a spanned result. fn parse_seq<T: copy>(bra: token::token, ket: token::token, sep: seq_sep, f: fn(parser) -> T) -> spanned<[T]> { let lo = self.span.lo; @@ -218,4 +221,4 @@ impl parser_common for parser { self.bump(); ret spanned(lo, hi, result); } -} \ No newline at end of file +} |
