Skip to content

Commit 83cdae6

Browse files
committed
Replaced empty destructors with NonCopyable #7427
closes #7427
1 parent fc766ef commit 83cdae6

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/libsyntax/parse/parser.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -340,13 +340,10 @@ pub struct Parser {
340340
mod_path_stack: @mut ~[@str],
341341
/// Stack of spans of open delimiters. Used for error message.
342342
open_braces: @mut ~[Span]
343+
/// removed empty drop function and added a priv new_field of type std::util::NonCopyable
344+
priv new_field: util::NonCopyable
343345
}
344346

345-
#[unsafe_destructor]
346-
impl Drop for Parser {
347-
/* do not copy the parser; its state is tied to outside state */
348-
fn drop(&mut self) {}
349-
}
350347

351348
fn is_plain_ident_or_underscore(t: &token::Token) -> bool {
352349
is_plain_ident(t) || *t == token::UNDERSCORE

0 commit comments

Comments
 (0)