Change taskgroup key type to fn:Copy in prep for noncopyable stack closures.

This commit is contained in:
Ben Blum
2013-06-21 18:52:53 -04:00
parent 4e78c1e2a8
commit 5784c0912f
4 changed files with 4 additions and 4 deletions

View File

@@ -1202,7 +1202,7 @@ mod big_tests {
struct LVal<'self> { struct LVal<'self> {
val: uint, val: uint,
key: &'self fn(@uint), key: &'self fn:Copy(@uint),
} }
#[unsafe_destructor] #[unsafe_destructor]

View File

@@ -46,7 +46,7 @@ use task::local_data_priv::{local_get, local_pop, local_modify, local_set, Handl
* *
* These two cases aside, the interface is safe. * These two cases aside, the interface is safe.
*/ */
pub type LocalDataKey<'self,T> = &'self fn(v: @T); pub type LocalDataKey<'self,T> = &'self fn:Copy(v: @T);
/** /**
* Remove a task-local data value from the table, returning the * Remove a task-local data value from the table, returning the

View File

@@ -704,7 +704,7 @@ pub fn new_sctable_internal() -> SCTable {
pub fn get_sctable() -> @mut SCTable { pub fn get_sctable() -> @mut SCTable {
unsafe { unsafe {
let sctable_key = (cast::transmute::<(uint, uint), let sctable_key = (cast::transmute::<(uint, uint),
&fn(v: @@mut SCTable)>( &fn:Copy(v: @@mut SCTable)>(
(-4 as uint, 0u))); (-4 as uint, 0u)));
match local_data::local_data_get(sctable_key) { match local_data::local_data_get(sctable_key) {
None => { None => {

View File

@@ -484,7 +484,7 @@ pub fn get_ident_interner() -> @ident_interner {
unsafe { unsafe {
let key = let key =
(cast::transmute::<(uint, uint), (cast::transmute::<(uint, uint),
&fn(v: @@::parse::token::ident_interner)>( &fn:Copy(v: @@::parse::token::ident_interner)>(
(-3 as uint, 0u))); (-3 as uint, 0u)));
match local_data::local_data_get(key) { match local_data::local_data_get(key) {
Some(interner) => *interner, Some(interner) => *interner,