Skip to content

Commit 5784c09

Browse files
committed
Change taskgroup key type to fn:Copy in prep for noncopyable stack closures.
1 parent 4e78c1e commit 5784c09

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/libextra/sort.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,7 @@ mod big_tests {
12021202

12031203
struct LVal<'self> {
12041204
val: uint,
1205-
key: &'self fn(@uint),
1205+
key: &'self fn:Copy(@uint),
12061206
}
12071207

12081208
#[unsafe_destructor]

src/libstd/local_data.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ use task::local_data_priv::{local_get, local_pop, local_modify, local_set, Handl
4646
*
4747
* These two cases aside, the interface is safe.
4848
*/
49-
pub type LocalDataKey<'self,T> = &'self fn(v: @T);
49+
pub type LocalDataKey<'self,T> = &'self fn:Copy(v: @T);
5050

5151
/**
5252
* Remove a task-local data value from the table, returning the

src/libsyntax/ast_util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ pub fn new_sctable_internal() -> SCTable {
704704
pub fn get_sctable() -> @mut SCTable {
705705
unsafe {
706706
let sctable_key = (cast::transmute::<(uint, uint),
707-
&fn(v: @@mut SCTable)>(
707+
&fn:Copy(v: @@mut SCTable)>(
708708
(-4 as uint, 0u)));
709709
match local_data::local_data_get(sctable_key) {
710710
None => {

src/libsyntax/parse/token.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ pub fn get_ident_interner() -> @ident_interner {
484484
unsafe {
485485
let key =
486486
(cast::transmute::<(uint, uint),
487-
&fn(v: @@::parse::token::ident_interner)>(
487+
&fn:Copy(v: @@::parse::token::ident_interner)>(
488488
(-3 as uint, 0u)));
489489
match local_data::local_data_get(key) {
490490
Some(interner) => *interner,

0 commit comments

Comments
 (0)