diff options
| author | bors <bors@rust-lang.org> | 2014-05-03 10:56:57 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-05-03 10:56:57 -0700 |
| commit | 0c691df8acaf10aa3721476e5d7fafcee11b0aaa (patch) | |
| tree | 7aca9144c64039fea0aff444e13870b4be40fae7 /src/libsyntax/parse | |
| parent | bca9647cd34c78a1c7c2409fbb2c31cb2c8194d7 (diff) | |
| parent | a5be12ce7e88c1d28de1c98215991127d1e765f0 (diff) | |
| download | rust-0c691df8acaf10aa3721476e5d7fafcee11b0aaa.tar.gz rust-0c691df8acaf10aa3721476e5d7fafcee11b0aaa.zip | |
auto merge of #13773 : brson/rust/boxxy, r=alexcrichton
`box` is the way you allocate in future-rust.
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/lexer.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/parse/mod.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax/parse/lexer.rs b/src/libsyntax/parse/lexer.rs index c1f6e21f923..43535205601 100644 --- a/src/libsyntax/parse/lexer.rs +++ b/src/libsyntax/parse/lexer.rs @@ -1020,8 +1020,8 @@ mod test { use std::io::util; fn mk_sh() -> diagnostic::SpanHandler { - let emitter = diagnostic::EmitterWriter::new(~util::NullWriter); - let handler = diagnostic::mk_handler(~emitter); + let emitter = diagnostic::EmitterWriter::new(box util::NullWriter); + let handler = diagnostic::mk_handler(box emitter); diagnostic::mk_span_handler(handler, CodeMap::new()) } diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index 0d3ae3b5cb8..dec6e6dd374 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -247,7 +247,7 @@ pub fn filemap_to_tts(sess: &ParseSess, filemap: Rc<FileMap>) // parsing tt's probably shouldn't require a parser at all. let cfg = Vec::new(); let srdr = lexer::new_string_reader(&sess.span_diagnostic, filemap); - let mut p1 = Parser(sess, cfg, ~srdr); + let mut p1 = Parser(sess, cfg, box srdr); p1.parse_all_token_trees() } @@ -256,7 +256,7 @@ pub fn tts_to_parser<'a>(sess: &'a ParseSess, tts: Vec<ast::TokenTree>, cfg: ast::CrateConfig) -> Parser<'a> { let trdr = lexer::new_tt_reader(&sess.span_diagnostic, None, tts); - Parser(sess, cfg, ~trdr) + Parser(sess, cfg, box trdr) } // abort if necessary diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 5d8443b64d5..6989ceb0d79 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -751,7 +751,7 @@ impl<'a> Parser<'a> { self.last_span = self.span; // Stash token for error recovery (sometimes; clone is not necessarily cheap). self.last_token = if is_ident_or_path(&self.token) { - Some(~self.token.clone()) + Some(box self.token.clone()) } else { None }; |
