Skip to content

Commit 1abc1be

Browse files
committed
remove 3-line used-once function
1 parent 7ef92ba commit 1abc1be

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/libsyntax/parse/parser.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3350,13 +3350,7 @@ pub impl Parser {
33503350
a_var
33513351
}
33523352

3353-
fn parse_dtor(&self, attrs: ~[attribute]) -> class_contents {
3354-
let lo = self.last_span.lo;
3355-
let body = self.parse_block();
3356-
dtor_decl(body, attrs, mk_sp(lo, self.last_span.hi))
3357-
}
3358-
3359-
// parse an item in a struct definition
3353+
// parse an element of a struct definition
33603354
fn parse_struct_decl_field(&self) -> class_contents {
33613355

33623356
if self.try_parse_obsolete_priv_section() {
@@ -3378,7 +3372,9 @@ pub impl Parser {
33783372
}
33793373

33803374
if self.eat_keyword(&~"drop") {
3381-
return self.parse_dtor(attrs);
3375+
let lo = self.last_span.lo;
3376+
let body = self.parse_block();
3377+
return dtor_decl(body, attrs, mk_sp(lo, self.last_span.hi))
33823378
}
33833379
else {
33843380
return members(~[self.parse_single_struct_field(inherited)]);

0 commit comments

Comments
 (0)