diff options
| author | bors <bors@rust-lang.org> | 2013-06-29 04:22:53 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-06-29 04:22:53 -0700 |
| commit | 132cfcdd8898a12b19ba01ae64cd9cff9a4c45d9 (patch) | |
| tree | 53a9a390765ba6af5988811ee3f23944cf888af8 /src/libsyntax/parse | |
| parent | c80e3bac3e676abb106f7ef8ac7da5b153c65c8e (diff) | |
| parent | d7544fe987104ad0a82b1929b819cfd7e2321bb2 (diff) | |
| download | rust-132cfcdd8898a12b19ba01ae64cd9cff9a4c45d9.tar.gz rust-132cfcdd8898a12b19ba01ae64cd9cff9a4c45d9.zip | |
auto merge of #7363 : bblum/rust/soundness, r=nikomatsakis
The commit f9a5453 is meant to be a temporary hold-over. Whether or not there is added a way for the compiler to "implicitly borrow" stack closures in this way, there should be a codegen optimization that prevents having to traverse possibly-very-many function pointers to find the function you ultimately wanted to call. I tried to separate out the changes so this particular commit could be straight-up reverted if auto-borrowing happens in the future. r? @nikomatsakis
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/token.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index 793626f0e18..94147825da4 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -22,7 +22,7 @@ use std::local_data; use std::rand; use std::rand::RngUtil; -#[deriving(Encodable, Decodable, Eq)] +#[deriving(Encodable, Decodable, Eq, IterBytes)] pub enum binop { PLUS, MINUS, @@ -36,7 +36,7 @@ pub enum binop { SHR, } -#[deriving(Encodable, Decodable, Eq)] +#[deriving(Encodable, Decodable, Eq, IterBytes)] pub enum Token { /* Expression-operator symbols. */ EQ, @@ -97,7 +97,7 @@ pub enum Token { EOF, } -#[deriving(Encodable, Decodable, Eq)] +#[deriving(Encodable, Decodable, Eq, IterBytes)] /// For interpolation during macro expansion. pub enum nonterminal { nt_item(@ast::item), @@ -484,7 +484,7 @@ pub fn get_ident_interner() -> @ident_interner { unsafe { let key = (cast::transmute::<(uint, uint), - &fn(v: @@::parse::token::ident_interner)>( + &fn:Copy(v: @@::parse::token::ident_interner)>( (-3 as uint, 0u))); match local_data::local_data_get(key) { Some(interner) => *interner, |
