diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-05-12 16:50:57 -0400 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-05-14 12:25:19 -0400 |
| commit | ffcc680f9cc26b5b2cb2f453a89dbcf8144f8b9b (patch) | |
| tree | 8f3f8634548c02309d281d6cdbfd7b34b7ea8c9d /src/libsyntax/parse | |
| parent | 5614e83e817a1d15286a1d4eeb6b665ddf5fe3cb (diff) | |
| download | rust-ffcc680f9cc26b5b2cb2f453a89dbcf8144f8b9b.tar.gz rust-ffcc680f9cc26b5b2cb2f453a89dbcf8144f8b9b.zip | |
Fix test fallout from removing vecs_implicitly_copyable
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/mod.rs | 13 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 |
2 files changed, 7 insertions, 8 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index bbd93b71d36..9a8a6620652 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -351,15 +351,14 @@ mod test { use core::option::None; use core::int; use core::num::NumCast; - use core::path::Path; - use codemap::{dummy_sp, CodeMap, span, BytePos, spanned}; + use codemap::{CodeMap, span, BytePos, spanned}; use opt_vec; use ast; use abi; use ast_util::mk_ident; use parse::parser::Parser; - use parse::token::{ident_interner, mk_ident_interner, mk_fresh_ident_interner}; - use diagnostic::{span_handler, mk_span_handler, mk_handler, Emitter}; + use parse::token::{ident_interner, mk_fresh_ident_interner}; + use diagnostic::{mk_span_handler, mk_handler}; // add known names to interner for testing fn mk_testing_interner() -> @ident_interner { @@ -408,7 +407,7 @@ mod test { // map a string to tts, return the tt without its parsesess fn string_to_tts_only(source_str : @~str) -> ~[ast::token_tree] { - let (tts,ps) = string_to_tts_t(source_str); + let (tts,_ps) = string_to_tts_t(source_str); tts } @@ -483,7 +482,7 @@ mod test { }*/ #[test] fn string_to_tts_1 () { - let (tts,ps) = string_to_tts_t(@~"fn a (b : int) { b; }"); + let (tts,_ps) = string_to_tts_t(@~"fn a (b : int) { b; }"); assert_eq!(to_json_str(@tts), ~"[\ [\"tt_tok\",null,[\"IDENT\",\"fn\",false]],\ @@ -548,7 +547,7 @@ mod test { } fn parser_done(p: Parser){ - assert_eq!(*p.token,token::EOF); + assert_eq!(copy *p.token,token::EOF); } #[test] fn parse_ident_pat () { diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 2a7af36f6f2..e1fe20695c7 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -2388,7 +2388,7 @@ pub impl Parser { // preceded by unary-minus) or identifiers. let val = self.parse_literal_maybe_minus(); if self.eat(&token::DOTDOT) { - let end = if is_ident_or_path(&tok) { + let end = if is_ident_or_path(tok) { let path = self.parse_path_with_tps(true); let hi = self.span.hi; self.mk_expr(lo, hi, expr_path(path)) |
