diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2014-02-28 12:54:01 -0800 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2014-03-01 22:40:52 -0800 |
| commit | 198cc3d850136582651489328fec221a2b98bfef (patch) | |
| tree | fe47f6fab3d4ead61053684613d0b1852ec7e311 /src/libsyntax/parse/token.rs | |
| parent | 58fd6ab90db3eb68c94695e1254a73e57bc44658 (diff) | |
| download | rust-198cc3d850136582651489328fec221a2b98bfef.tar.gz rust-198cc3d850136582651489328fec221a2b98bfef.zip | |
libsyntax: Fix errors arising from the automated `~[T]` conversion
Diffstat (limited to 'src/libsyntax/parse/token.rs')
| -rw-r--r-- | src/libsyntax/parse/token.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index d7d8752b009..1499a1b4c19 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -21,6 +21,7 @@ use std::char; use std::fmt; use std::local_data; use std::path::BytesContainer; +use std::vec_ng::Vec; #[allow(non_camel_case_types)] #[deriving(Clone, Encodable, Decodable, Eq, Hash, Show)] @@ -412,13 +413,11 @@ macro_rules! declare_special_idents_and_keywords {( // The indices here must correspond to the numbers in // special_idents, in Keyword to_ident(), and in static // constants below. - let init_vec = vec!( - $( $si_str, )* - $( $sk_str, )* - $( $rk_str, )* - ); - - interner::StrInterner::prefill(init_vec) + let mut init_vec = Vec::new(); + $(init_vec.push($si_str);)* + $(init_vec.push($sk_str);)* + $(init_vec.push($rk_str);)* + interner::StrInterner::prefill(init_vec.as_slice()) } }} |
