remove 3-line used-once function
This commit is contained in:
parent
7ef92ba246
commit
1abc1be81a
1 changed files with 4 additions and 8 deletions
|
@ -3350,13 +3350,7 @@ pub impl Parser {
|
||||||
a_var
|
a_var
|
||||||
}
|
}
|
||||||
|
|
||||||
fn parse_dtor(&self, attrs: ~[attribute]) -> class_contents {
|
// parse an element of a struct definition
|
||||||
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
|
|
||||||
fn parse_struct_decl_field(&self) -> class_contents {
|
fn parse_struct_decl_field(&self) -> class_contents {
|
||||||
|
|
||||||
if self.try_parse_obsolete_priv_section() {
|
if self.try_parse_obsolete_priv_section() {
|
||||||
|
@ -3378,7 +3372,9 @@ pub impl Parser {
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.eat_keyword(&~"drop") {
|
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 {
|
else {
|
||||||
return members(~[self.parse_single_struct_field(inherited)]);
|
return members(~[self.parse_single_struct_field(inherited)]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue