diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-07-02 12:47:32 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-07-17 14:57:51 -0700 |
| commit | 99b33f721954bc5290f9201c8f64003c294d0571 (patch) | |
| tree | 786c9bf75d54512d0a80f6975ad40516ab432c3a /src/libsyntax/parse/mod.rs | |
| parent | b4e674f6e662bc80f2e7a5a1a9834f2152f08d32 (diff) | |
| download | rust-99b33f721954bc5290f9201c8f64003c294d0571.tar.gz rust-99b33f721954bc5290f9201c8f64003c294d0571.zip | |
librustc: Remove all uses of "copy".
Diffstat (limited to 'src/libsyntax/parse/mod.rs')
| -rw-r--r-- | src/libsyntax/parse/mod.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index 84cc49192ed..410849b4482 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -79,7 +79,7 @@ pub fn parse_crate_from_file( cfg: ast::crate_cfg, sess: @mut ParseSess ) -> @ast::crate { - new_parser_from_file(sess, /*bad*/ copy cfg, input).parse_crate_mod() + new_parser_from_file(sess, /*bad*/ cfg.clone(), input).parse_crate_mod() // why is there no p.abort_if_errors here? } @@ -89,12 +89,10 @@ pub fn parse_crate_from_source_str( cfg: ast::crate_cfg, sess: @mut ParseSess ) -> @ast::crate { - let p = new_parser_from_source_str( - sess, - /*bad*/ copy cfg, - name, - source - ); + let p = new_parser_from_source_str(sess, + /*bad*/ cfg.clone(), + name, + source); maybe_aborted(p.parse_crate_mod(),p) } @@ -457,7 +455,7 @@ mod test { } fn parser_done(p: Parser){ - assert_eq!(copy *p.token,token::EOF); + assert_eq!((*p.token).clone(), token::EOF); } #[test] fn parse_ident_pat () { |
