diff options
| author | John Clements <clements@racket-lang.org> | 2013-04-19 11:19:37 -0700 |
|---|---|---|
| committer | John Clements <clements@racket-lang.org> | 2013-04-28 09:51:16 -0700 |
| commit | 1abc1be81ad47ed97f37ca98429156e4392df12c (patch) | |
| tree | 2fdbb8d141eb89dbbf5fbd03b221b217f150569a /src/libsyntax/parse/parser.rs | |
| parent | 7ef92ba246349b396333c8aaa8337667030a935f (diff) | |
| download | rust-1abc1be81ad47ed97f37ca98429156e4392df12c.tar.gz rust-1abc1be81ad47ed97f37ca98429156e4392df12c.zip | |
remove 3-line used-once function
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index d15ec21a63f..f3ab287c32f 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -3350,13 +3350,7 @@ pub impl Parser { a_var } - fn parse_dtor(&self, attrs: ~[attribute]) -> class_contents { - let lo = self.last_span.lo; - let body = self.parse_block(); - dtor_decl(body, attrs, mk_sp(lo, self.last_span.hi)) - } - - // parse an item in a struct definition + // parse an element of a struct definition fn parse_struct_decl_field(&self) -> class_contents { if self.try_parse_obsolete_priv_section() { @@ -3378,7 +3372,9 @@ pub impl Parser { } if self.eat_keyword(&~"drop") { - return self.parse_dtor(attrs); + let lo = self.last_span.lo; + let body = self.parse_block(); + return dtor_decl(body, attrs, mk_sp(lo, self.last_span.hi)) } else { return members(~[self.parse_single_struct_field(inherited)]); |
